# CVE-2023-52804: fs/jfs: Add validity check for db_maxag and db_agpref

- 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.26%, higher than 18% of CVEs (2026-12-01)
- Published: 2024-05-21T15:31:15.720Z
- Modified: 2026-08-05T09:11:29.986Z
- Weaknesses: CWE-129
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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

fs/jfs: Add validity check for db_maxag and db_agpref

Both db_maxag and db_agpref are used as the index of the
db_agfree array, but there is currently no validity check for
db_maxag and db_agpref, which can lead to errors.

The following is related bug reported by Syzbot:

UBSAN: array-index-out-of-bounds in fs/jfs/jfs_dmap.c:639:20
index 7936 is out of range for type 'atomic_t[128]'

Add checking that the values of db_maxag and db_agpref are valid
indexes for the db_agfree array.

(As written by CVE List.)

## Affected

- Linux Linux: from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before a0649e2dd4a3595b5595a29d0064d047c2fae2fb; from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before ce15b0f1a431168f07b1cc6c9f71206a2db5c809; from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before 32bd8f1cbcf8b663e29dd1f908ba3a129541a11b; from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before c6c8863fb3f57700ab583d875adda04caaf2278a; from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before 1f74d336990f37703a8eee77153463d65b67f70e; from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before 5013f8269887642cca784adc8db9b5f0b771533f; from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before dca403bb035a565bb98ecc1dda5d30f676feda40; from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before 2323de34a3ae61a9f9b544c18583f71cea86721f; from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 before 64933ab7b04881c6c18b21ff206c12278341c72e; 2.6.12 (not affected: before 2.6.12; from 4.14.331 up to 4.14.*; from 4.19.300 up to 4.19.*; from 5.4.262 up to 5.4.*; from 5.10.202 up to 5.10.*; from 5.15.140 up to 5.15.*; from 6.1.64 up to 6.1.*; from 6.5.13 up to 6.5.*; from 6.6.3 up to 6.6.*; from 6.7 up to *)
- linux linux_kernel: before 4.14.331; from 4.15 before 4.19.300; from 4.20 before 5.4.262; from 5.5 before 5.10.202; from 5.11 before 5.15.140; from 5.16 before 6.1.64; from 6.2 before 6.5.13; from 6.6 before 6.6.3

## 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`
- NVD: 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`

## References

- <https://git.kernel.org/stable/c/a0649e2dd4a3595b5595a29d0064d047c2fae2fb> (patch)
- <https://git.kernel.org/stable/c/ce15b0f1a431168f07b1cc6c9f71206a2db5c809> (patch)
- <https://git.kernel.org/stable/c/32bd8f1cbcf8b663e29dd1f908ba3a129541a11b> (patch)
- <https://git.kernel.org/stable/c/c6c8863fb3f57700ab583d875adda04caaf2278a> (patch)
- <https://git.kernel.org/stable/c/1f74d336990f37703a8eee77153463d65b67f70e> (patch)
- <https://git.kernel.org/stable/c/5013f8269887642cca784adc8db9b5f0b771533f> (patch)
- <https://git.kernel.org/stable/c/dca403bb035a565bb98ecc1dda5d30f676feda40> (patch)
- <https://git.kernel.org/stable/c/2323de34a3ae61a9f9b544c18583f71cea86721f> (patch)
- <https://git.kernel.org/stable/c/64933ab7b04881c6c18b21ff206c12278341c72e> (patch)

## Sources

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

---

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