{"id":"CVE-2023-52805","state":"PUBLISHED","title":"jfs: fix array-index-out-of-bounds in diAlloc","description":"In the Linux kernel, the following vulnerability has been resolved:\n\njfs: fix array-index-out-of-bounds in diAlloc\n\nCurrently there is not check against the agno of the iag while\nallocating new inodes to avoid fragmentation problem. Added the check\nwhich is required.","publishedAt":"2024-05-21T15:31:16.374Z","updatedAt":"2026-08-05T09:11:31.057Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"2308d0fb0dc32446b4e6ca37cd09c30374bb64e9","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"cf7e3e84df36a9953796c737f080712f631d7083","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"7467ca10a5ff09b0e87edf6c4d2a4bfdee69cf2c","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"1ba7df5457dc1c1071c5f92ac11323533a6430e1","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"64f062baf202b82f54987a3f614a6c8f3e466641","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"8c68af2af697ba2ba3b138be0c6d72e2ce3a3d6d","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"665b44e55c2767a4f899c3b18f49e9e1c9983777","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"1708d0a9917fea579cc9da3d87b154285abd2cd8","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"05d9ea1ceb62a55af6727a69269a4fd310edf483","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/jfs/jfs_imap.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":"4.14.331","status":"unaffected","lessThanOrEqual":"4.14.*","versionType":"semver"},{"version":"4.19.300","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.262","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.202","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.140","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.64","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.5.13","status":"unaffected","lessThanOrEqual":"6.5.*","versionType":"semver"},{"version":"6.6.3","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7","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_imap.c"]}],"references":["https://git.kernel.org/stable/c/2308d0fb0dc32446b4e6ca37cd09c30374bb64e9","https://git.kernel.org/stable/c/cf7e3e84df36a9953796c737f080712f631d7083","https://git.kernel.org/stable/c/7467ca10a5ff09b0e87edf6c4d2a4bfdee69cf2c","https://git.kernel.org/stable/c/1ba7df5457dc1c1071c5f92ac11323533a6430e1","https://git.kernel.org/stable/c/64f062baf202b82f54987a3f614a6c8f3e466641","https://git.kernel.org/stable/c/8c68af2af697ba2ba3b138be0c6d72e2ce3a3d6d","https://git.kernel.org/stable/c/665b44e55c2767a4f899c3b18f49e9e1c9983777","https://git.kernel.org/stable/c/1708d0a9917fea579cc9da3d87b154285abd2cd8","https://git.kernel.org/stable/c/05d9ea1ceb62a55af6727a69269a4fd310edf483"],"weaknesses":["CWE-129"],"ingestedAt":"2026-10-29T20:06:33.064Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/52xxx/CVE-2023-52805.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-52805","state":"PUBLISHED","datePublished":"2024-05-21T15:31:16.374Z","dateUpdated":"2026-08-05T09:11:31.057Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-05-21T15:19:24.247Z"},"containers":{"cna":{"title":"jfs: fix array-index-out-of-bounds in diAlloc","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\njfs: fix array-index-out-of-bounds in diAlloc\n\nCurrently there is not check against the agno of the iag while\nallocating new inodes to avoid fragmentation problem. Added the check\nwhich is required."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"2308d0fb0dc32446b4e6ca37cd09c30374bb64e9","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"cf7e3e84df36a9953796c737f080712f631d7083","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"7467ca10a5ff09b0e87edf6c4d2a4bfdee69cf2c","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"1ba7df5457dc1c1071c5f92ac11323533a6430e1","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"64f062baf202b82f54987a3f614a6c8f3e466641","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"8c68af2af697ba2ba3b138be0c6d72e2ce3a3d6d","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"665b44e55c2767a4f899c3b18f49e9e1c9983777","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"1708d0a9917fea579cc9da3d87b154285abd2cd8","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"05d9ea1ceb62a55af6727a69269a4fd310edf483","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/jfs/jfs_imap.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":"4.14.331","status":"unaffected","lessThanOrEqual":"4.14.*","versionType":"semver"},{"version":"4.19.300","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.262","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.202","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.140","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.64","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.5.13","status":"unaffected","lessThanOrEqual":"6.5.*","versionType":"semver"},{"version":"6.6.3","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7","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_imap.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/2308d0fb0dc32446b4e6ca37cd09c30374bb64e9"},{"url":"https://git.kernel.org/stable/c/cf7e3e84df36a9953796c737f080712f631d7083"},{"url":"https://git.kernel.org/stable/c/7467ca10a5ff09b0e87edf6c4d2a4bfdee69cf2c"},{"url":"https://git.kernel.org/stable/c/1ba7df5457dc1c1071c5f92ac11323533a6430e1"},{"url":"https://git.kernel.org/stable/c/64f062baf202b82f54987a3f614a6c8f3e466641"},{"url":"https://git.kernel.org/stable/c/8c68af2af697ba2ba3b138be0c6d72e2ce3a3d6d"},{"url":"https://git.kernel.org/stable/c/665b44e55c2767a4f899c3b18f49e9e1c9983777"},{"url":"https://git.kernel.org/stable/c/1708d0a9917fea579cc9da3d87b154285abd2cd8"},{"url":"https://git.kernel.org/stable/c/05d9ea1ceb62a55af6727a69269a4fd310edf483"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The bug is reached only after a local mount of an attacker-crafted JFS image, then a create path (open/creat → jfs_create → ialloc → diAlloc); fs/jfs has no network or adjacent-protocol entry point.\nAC:L - agstart is taken from on-disk IAG metadata into the parent inode, so a crafted image sets agno (including the syzbot index -1) deterministically; creating a regular file then hits db_active[agno]/AG_LOCK/im_agctl with no race or attacker-uncontrollable state.\nPR:L - As with sibling JFS crafted-image CVEs, an unprivileged local session user can attach the malicious image via udisks2/polkit/automount on desktops, kiosks, and shared workstations, then trigger diAlloc with ordinary file creation.\nUI:N - The attacker supplies the image, causes it to be mounted (including via automount/udisks on their own session), and drives file creation themselves; no separate victim action is required at exploitation time.\nS:U - Out-of-bounds indexing of in-kernel bmap/imap arrays corrupts host kernel memory only and does not cross a VM, IOMMU, or other separate security authority.\nC:H - Invalid agno causes out-of-bounds reads of db_active[] and adjacent kernel/imap state; under the memory-corruption guidance this is reasonably leveraged for high confidentiality impact.\nI:H - The same bad agno indexes im_aglock[] and im_agctl[], and later allocation paths write im_agctl[agno].numfree and related map state, yielding out-of-bounds kernel writes suitable for control-flow hijacking.\nA:H - Syzbot reported UBSAN array-index-out-of-bounds in diAlloc (panic under UBSAN_TRAP/panic_on_warn), and the OOB lock/agctl accesses also produce kernel oopses and filesystem failure."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T09:11:31.057Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"4.14.331"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"4.19.300"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"5.4.262"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"5.10.202"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"5.15.140"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.1.64"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.5.13"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.6.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.7"}]}]}],"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":{"timestamp":"2025-10-01T19:18:27.367558Z","id":"CVE-2023-52805","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-129","type":"CWE","lang":"en","description":"CWE-129 Improper Validation of Array Index"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-10-01T19:18:52.937Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/2308d0fb0dc32446b4e6ca37cd09c30374bb64e9","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/cf7e3e84df36a9953796c737f080712f631d7083","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/7467ca10a5ff09b0e87edf6c4d2a4bfdee69cf2c","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/1ba7df5457dc1c1071c5f92ac11323533a6430e1","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/64f062baf202b82f54987a3f614a6c8f3e466641","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/8c68af2af697ba2ba3b138be0c6d72e2ce3a3d6d","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/665b44e55c2767a4f899c3b18f49e9e1c9983777","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/1708d0a9917fea579cc9da3d87b154285abd2cd8","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/05d9ea1ceb62a55af6727a69269a4fd310edf483","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T23:11:36.055Z"}}]}}}