{"id":"CVE-2024-56598","state":"PUBLISHED","title":"jfs: array-index-out-of-bounds fix in dtReadFirst","description":"In the Linux kernel, the following vulnerability has been resolved:\n\njfs: array-index-out-of-bounds fix in dtReadFirst\n\nThe value of stbl can be sometimes out of bounds due\nto a bad filesystem. Added a check with appopriate return\nof error code in that case.","publishedAt":"2024-12-27T14:51:04.988Z","updatedAt":"2026-08-05T11:45:19.362Z","severity":{"score":7.1,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"25f1e673ef61d6bf9a6022e27936785896d74948","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"8c97a4d5463a1c972ef576ac499ea9b05f956097","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"823d573f5450ca6be80b36f54d1902ac7cd23fb9","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"2eea5fda5556ef03defebf07b0a12fcd2c5210f4","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"fd993b2180b4c373af8b99aa28d4dcda5c2a8f10","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"22dcbf7661c6ffc3247978c254dc40b833a0d429","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"ca84a2c9be482836b86d780244f0357e5a778c46","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/jfs/jfs_dtree.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.12","versionType":"semver"},{"version":"5.4.287","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.231","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.174","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.120","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.66","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.5","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/jfs/jfs_dtree.c"]}],"references":["https://git.kernel.org/stable/c/25f1e673ef61d6bf9a6022e27936785896d74948","https://git.kernel.org/stable/c/8c97a4d5463a1c972ef576ac499ea9b05f956097","https://git.kernel.org/stable/c/823d573f5450ca6be80b36f54d1902ac7cd23fb9","https://git.kernel.org/stable/c/2eea5fda5556ef03defebf07b0a12fcd2c5210f4","https://git.kernel.org/stable/c/fd993b2180b4c373af8b99aa28d4dcda5c2a8f10","https://git.kernel.org/stable/c/22dcbf7661c6ffc3247978c254dc40b833a0d429","https://git.kernel.org/stable/c/ca84a2c9be482836b86d780244f0357e5a778c46","https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html","https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html"],"weaknesses":["CWE-129"],"ingestedAt":"2026-10-29T20:08:12.933Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/56xxx/CVE-2024-56598.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-56598","state":"PUBLISHED","datePublished":"2024-12-27T14:51:04.988Z","dateUpdated":"2026-08-05T11:45:19.362Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-12-27T14:03:06.010Z"},"containers":{"cna":{"title":"jfs: array-index-out-of-bounds fix in dtReadFirst","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\njfs: array-index-out-of-bounds fix in dtReadFirst\n\nThe value of stbl can be sometimes out of bounds due\nto a bad filesystem. Added a check with appopriate return\nof error code in that case."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"25f1e673ef61d6bf9a6022e27936785896d74948","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"8c97a4d5463a1c972ef576ac499ea9b05f956097","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"823d573f5450ca6be80b36f54d1902ac7cd23fb9","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"2eea5fda5556ef03defebf07b0a12fcd2c5210f4","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"fd993b2180b4c373af8b99aa28d4dcda5c2a8f10","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"22dcbf7661c6ffc3247978c254dc40b833a0d429","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"ca84a2c9be482836b86d780244f0357e5a778c46","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/jfs/jfs_dtree.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.12","versionType":"semver"},{"version":"5.4.287","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.231","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.174","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.120","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.66","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.5","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/jfs/jfs_dtree.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/25f1e673ef61d6bf9a6022e27936785896d74948"},{"url":"https://git.kernel.org/stable/c/8c97a4d5463a1c972ef576ac499ea9b05f956097"},{"url":"https://git.kernel.org/stable/c/823d573f5450ca6be80b36f54d1902ac7cd23fb9"},{"url":"https://git.kernel.org/stable/c/2eea5fda5556ef03defebf07b0a12fcd2c5210f4"},{"url":"https://git.kernel.org/stable/c/fd993b2180b4c373af8b99aa28d4dcda5c2a8f10"},{"url":"https://git.kernel.org/stable/c/22dcbf7661c6ffc3247978c254dc40b833a0d429"},{"url":"https://git.kernel.org/stable/c/ca84a2c9be482836b86d780244f0357e5a778c46"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H","baseScore":7.1,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The malicious data is on-disk JFS directory-btree metadata consumed locally via `mount(2)` followed by `getdents(2)` on the crafted directory; no network- or peer-supplied data reaches `dtReadFirst()`. The image is delivered as removable media, a loop-mountable file, or a container/appliance disk blob.\nAC:L - The attacker sets `stbl[0]` to any negative value directly in the on-disk image, so the out-of-bounds index and its exact -32..-4096 byte offset are fully attacker-chosen and fire deterministically on the first `readdir()` of the crafted directory. There is no race, timing window, or memory-layout condition outside the attacker's influence.\nPR:N - The attacker needs no account or privilege on the target system — they only author the crafted JFS image, and the privileged mount is performed by the victim or by automounting tooling. This matches the established scoring for crafted-filesystem-image CVEs in this subsystem.\nUI:R - JFS is `FS_REQUIRES_DEV` without `FS_USERNS_MOUNT`, so the attacker cannot mount the image themselves; a victim (root, udisks/automounter, or image-processing automation) must mount it and then list the directory, though a single `ls` is enough once mounted.\nS:U - The out-of-bounds read and any resulting fault stay inside the kernel of the same host; no hypervisor, IOMMU, or sandbox boundary is crossed.\nC:H - The attacker selects any 8-byte window across a 4 KB region preceding the dtree page — for the root case that is inside `struct jfs_inode_info` and neighbouring slab objects, exposing kernel pointers such as `ipimap` and `anon_inode_list` — so the read is far from \"strictly bounded to a few bytes.\" The leaked bytes become `bn`/`psize` and select which attacker-authored disk block is fetched and listed, giving an observable oracle that exfiltrates the disclosed kernel memory through `readdir()` output.\nI:N - `xd` is only dereferenced for reading in `dtReadFirst()`; the out-of-bounds access performs no kernel memory write and yields no corruption or control-flow primitive. The only writes it can steer (`add_missing_indices()`) land on blocks of the attacker's own crafted block device, not on victim-owned kernel or system state.\nA:H - This is the syzbot-reported UBSAN array-index-out-of-bounds; on `CONFIG_UBSAN_BOUNDS` + `CONFIG_UBSAN_TRAP` builds (Android GKI and hardened kernels) the check traps into a kernel panic, and on KASAN/`panic_on_warn` configurations the slab-out-of-bounds report is fatal. The garbage `bn`/`psize` additionally drives `jfs_error()` paths that panic under `errors=panic`, and the trigger is repeatable on every `readdir()` of the crafted directory."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:45:19.362Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"5.4.287"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"5.10.231"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"5.15.174"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.1.120"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.6.66"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.12.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.13"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.8,"attackVector":"LOCAL","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","integrityImpact":"HIGH","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"id":"CVE-2024-56598","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2025-10-01T20:01:28.259842Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-129","lang":"en","type":"CWE","description":"CWE-129 Improper Validation of Array Index"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-10-01T20:07:13.876Z"}},{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html"},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T20:50:33.896Z"}}]}}}