{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-50567","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2025-10-22T13:20:23.760Z","datePublished":"2025-10-22T13:23:24.508Z","dateUpdated":"2026-08-05T08:59:08.386Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T08:59:08.386Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nfs: jfs: fix shift-out-of-bounds in dbAllocAG\n\nSyzbot found a crash : UBSAN: shift-out-of-bounds in dbAllocAG. The\nunderlying bug is the missing check of bmp->db_agl2size. The field can\nbe greater than 64 and trigger the shift-out-of-bounds.\n\nFix this bug by adding a check of bmp->db_agl2size in dbMount since this\nfield is used in many following functions. The upper bound for this\nfield is L2MAXL2SIZE - L2MAXAG, thanks for the help of Dave Kleikamp.\nNote that, for maintenance, I reorganized error handling code of dbMount."}],"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 - Reachable only after mounting a crafted JFS block/loop image, then ordinary local syscalls (mkdir → jfs_mkdir → ialloc → diAlloc → dbAlloc → dbAllocAG); fs/jfs has no network or adjacent-protocol entry point.\nAC:L - dn_agl2size is taken verbatim from attacker-controlled on-disk bmap metadata into bmp->db_agl2size, so the oversized shift in dbAllocAG (syzbot exponent 8345714) is deterministic with no race or attacker-uncontrollable state.\nPR:L - As with sibling JFS crafted-image CVEs, an unprivileged desktop/kiosk session user can attach the malicious image via udisks2/polkit/automount and then trigger dbAllocAG with ordinary mkdir; JFS lacks FS_USERNS_MOUNT but realistic low-privilege mount helpers still apply.\nUI:N - The attacker supplies the image, causes it to be mounted in their own session (including via automount/udisks), and drives mkdir themselves; no separate victim action is required at exploitation time.\nS:U - Wrong block-number computation and subsequent metapage/allocator corruption stay inside the host kernel’s security authority and do not cross a VM, IOMMU, or other separate boundary.\nC:H - An oversized db_agl2size makes the AG-start shift and later >> uses produce attacker-influenced block numbers so dbAllocAG/dbAlloc read wrong (attacker-controlled) dmapctl/dmap metapages and walk their trees/bitmaps, enabling disclosure consistent with other JFS dmap shift-OOB scores.\nI:H - Those wrong blkno/agno values then drive writes through dbAllocCtl/dbAllocBits into wmap/tree/nfree and in-memory db_agfree[] on heap-backed metapage/bmap state, yielding a write primitive suitable for control-flow hijacking under the higher-severity rule for memory corruption.\nA:H - Syzbot reported UBSAN shift-out-of-bounds in dbAllocAG (panic under UBSAN_TRAP/panic_on_warn), and the corrupted metapage/allocator paths also produce kernel oopses and jfs_error filesystem shutdown."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/jfs/jfs_dmap.c"],"versions":[{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","lessThan":"d3b486946a4e62c7ef6023f7d9c1d049051384ba","status":"affected","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","lessThan":"3115313cf03113e87c87adee18ee49a20bbdb9ba","status":"affected","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","lessThan":"eea87acb6027be3dd4d3c57186bb22800d57fdda","status":"affected","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","lessThan":"359616ce587e524107730504891afa4b1a8be58c","status":"affected","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","lessThan":"3e997e4ce8ae7ab89d72334120f6aee49c5bbdbd","status":"affected","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","lessThan":"0536f76a2bca83d1a3740517ba22cc93a44b3099","status":"affected","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","lessThan":"2c575c8905f7a8b32d5611b91856b69bac2a5bf1","status":"affected","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","lessThan":"67973caae78e21ee46a7281aaa8ca364eb9c444f","status":"affected","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","lessThan":"898f706695682b9954f280d95e49fa86ffa55d08","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/jfs/jfs_dmap.c"],"versions":[{"version":"2.6.12","status":"affected"},{"version":"0","lessThan":"2.6.12","status":"unaffected","versionType":"semver"},{"version":"4.9.337","lessThanOrEqual":"4.9.*","status":"unaffected","versionType":"semver"},{"version":"4.14.303","lessThanOrEqual":"4.14.*","status":"unaffected","versionType":"semver"},{"version":"4.19.270","lessThanOrEqual":"4.19.*","status":"unaffected","versionType":"semver"},{"version":"5.4.229","lessThanOrEqual":"5.4.*","status":"unaffected","versionType":"semver"},{"version":"5.10.163","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.86","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.0.16","lessThanOrEqual":"6.0.*","status":"unaffected","versionType":"semver"},{"version":"6.1.2","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.2","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"4.9.337"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"4.14.303"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"4.19.270"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"5.4.229"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"5.10.163"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"5.15.86"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.0.16"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.1.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.2"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/d3b486946a4e62c7ef6023f7d9c1d049051384ba"},{"url":"https://git.kernel.org/stable/c/3115313cf03113e87c87adee18ee49a20bbdb9ba"},{"url":"https://git.kernel.org/stable/c/eea87acb6027be3dd4d3c57186bb22800d57fdda"},{"url":"https://git.kernel.org/stable/c/359616ce587e524107730504891afa4b1a8be58c"},{"url":"https://git.kernel.org/stable/c/3e997e4ce8ae7ab89d72334120f6aee49c5bbdbd"},{"url":"https://git.kernel.org/stable/c/0536f76a2bca83d1a3740517ba22cc93a44b3099"},{"url":"https://git.kernel.org/stable/c/2c575c8905f7a8b32d5611b91856b69bac2a5bf1"},{"url":"https://git.kernel.org/stable/c/67973caae78e21ee46a7281aaa8ca364eb9c444f"},{"url":"https://git.kernel.org/stable/c/898f706695682b9954f280d95e49fa86ffa55d08"}],"title":"fs: jfs: fix shift-out-of-bounds in dbAllocAG","x_generator":{"engine":"bippy-1.2.0"}}}}