# CVE-2023-53222: jfs: jfs_dmap: Validate db_l2nbperpage while mounting

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.18%, higher than 7% of CVEs (2026-12-01)
- Published: 2025-09-15T14:21:50.970Z
- Modified: 2026-08-05T09:13:10.735Z
- Weaknesses: CWE-125
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

jfs: jfs_dmap: Validate db_l2nbperpage while mounting

In jfs_dmap.c at line 381, BLKTODMAP is used to get a logical block
number inside dbFree(). db_l2nbperpage, which is the log2 number of
blocks per page, is passed as an argument to BLKTODMAP which uses it
for shifting.

Syzbot reported a shift out-of-bounds crash because db_l2nbperpage is
too big. This happens because the large value is set without any
validation in dbMount() at line 181.

Thus, make sure that db_l2nbperpage is correct while mounting.

Max number of blocks per page = Page size / Min block size
=> log2(Max num_block per page) = log2(Page size / Min block size)
				= log2(Page size) - log2(Min block size)

=> Max db_l2nbperpage = L2PSIZE - L2MINBLOCKSIZE

(As written by CVE List.)

## Affected

- Linux Linux: from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before 8c1efe3f74a7864461b0dff281c5562154b4aa8e; from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before ef5c205b6e6f8d1f18ef0b4a9832b1b5fa85f7f2; from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before a4855aeb13e4ad1f23e16753b68212e180f7d848; from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before 47b7eaae08e8b2f25bdf37bc14d21be090bcb20f; from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before de984faecddb900fa850af4df574a25b32bb93f5; from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before c7feb54b113802d2aba98708769d3c33fb017254; from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before 2a03c4e683d33d17b667418eb717b13dda1fac6b; from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before 11509910c599cbd04585ec35a6d5e1a0053d84c1; 2.6.12 (not affected: before 2.6.12; from 4.14.322 up to 4.14.*; from 4.19.291 up to 4.19.*; from 5.4.251 up to 5.4.*; from 5.10.188 up to 5.10.*; from 5.15.121 up to 5.15.*; from 6.1.40 up to 6.1.*; from 6.4.5 up to 6.4.*; from 6.5 up to *)
- linux linux_kernel: before 4.14.322; from 4.15 before 4.19.291; from 4.20 before 5.4.251; from 5.5 before 5.10.188; from 5.11 before 5.15.121; from 5.16 before 6.1.40; from 6.2 before 6.4.5

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- CISA-ADP: CVSS:3.1 7.1 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- NVD: CVSS:3.1 7.1 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/8c1efe3f74a7864461b0dff281c5562154b4aa8e> (patch)
- <https://git.kernel.org/stable/c/ef5c205b6e6f8d1f18ef0b4a9832b1b5fa85f7f2> (patch)
- <https://git.kernel.org/stable/c/a4855aeb13e4ad1f23e16753b68212e180f7d848> (patch)
- <https://git.kernel.org/stable/c/47b7eaae08e8b2f25bdf37bc14d21be090bcb20f> (patch)
- <https://git.kernel.org/stable/c/de984faecddb900fa850af4df574a25b32bb93f5> (patch)
- <https://git.kernel.org/stable/c/c7feb54b113802d2aba98708769d3c33fb017254> (patch)
- <https://git.kernel.org/stable/c/2a03c4e683d33d17b667418eb717b13dda1fac6b> (patch)
- <https://git.kernel.org/stable/c/11509910c599cbd04585ec35a6d5e1a0053d84c1> (patch)

## Sources

- CVE List: [CVE-2023-53222](https://www.cve.org/CVERecord?id=CVE-2023-53222), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2023-53222](https://nvd.nist.gov/vuln/detail/CVE-2023-53222), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2023-53222 · Whole record: https://cve.day/CVE-2023-53222.json · Rebuilt by cve.day 2026-11-25T22:58:34.782Z
