{"id":"CVE-2026-72162","state":"PUBLISHED","title":"ocfs2: fix UBSAN array-index-out-of-bounds in ocfs2_sum_rightmost_rec","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2: fix UBSAN array-index-out-of-bounds in ocfs2_sum_rightmost_rec\n\n[BUG]\nOn-disk corruption setting l_next_free_rec to 0 in an inode's embedded\nextent list triggers a UBSAN panic on the next write to that file.\n\n[CAUSE]\nocfs2_sum_rightmost_rec() computes\ni = le16_to_cpu(el->l_next_free_rec) - 1\nand accesses el->l_recs[i] without validating i. When l_next_free_rec\nis 0, i becomes -1; when l_next_free_rec exceeds l_count, i falls\npast the end of the array. Either case violates the\n__counted_by_le(l_count) annotation on l_recs[] and triggers UBSAN.\n\n[FIX]\nValidate the inode's embedded extent list when the inode is read, in\nocfs2_validate_inode_block(): l_count must be non-zero and no larger\nthan the inode block can hold, and l_next_free_rec must not exceed\nl_count. A corrupt list is rejected at read time, before the b-tree\ncode can index l_recs[] out of bounds.","publishedAt":"2026-08-15T05:53:30.420Z","updatedAt":"2026-10-30T12:28:52.281Z","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":"dcd0538ff4e854fa9d7f4630b359ca8fdb5cb5a8","status":"affected","lessThan":"c88226315aec298894ec57e532f5e95f3b09e874","versionType":"git"},{"version":"dcd0538ff4e854fa9d7f4630b359ca8fdb5cb5a8","status":"affected","lessThan":"c286319746cef02bcce7384fda3a3f08989070d2","versionType":"git"},{"version":"dcd0538ff4e854fa9d7f4630b359ca8fdb5cb5a8","status":"affected","lessThan":"720fb324cf0f5116318cae7f75cb393d118ffb67","versionType":"git"},{"version":"dcd0538ff4e854fa9d7f4630b359ca8fdb5cb5a8","status":"affected","lessThan":"671889c553ea55e2da6a4f3b15f4c0fa40f2f0d1","versionType":"git"},{"version":"dcd0538ff4e854fa9d7f4630b359ca8fdb5cb5a8","status":"affected","lessThan":"858aa4965ffa8c0d4bb5dd835ac4f1c9a1dcab85","versionType":"git"},{"version":"dcd0538ff4e854fa9d7f4630b359ca8fdb5cb5a8","status":"affected","lessThan":"452a8467be8143747292218212671deeb186d2ae","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ocfs2/inode.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.22","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.22","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.160","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.114","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.40","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.5","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ocfs2/inode.c"]}],"references":["https://git.kernel.org/stable/c/c88226315aec298894ec57e532f5e95f3b09e874","https://git.kernel.org/stable/c/c286319746cef02bcce7384fda3a3f08989070d2","https://git.kernel.org/stable/c/720fb324cf0f5116318cae7f75cb393d118ffb67","https://git.kernel.org/stable/c/671889c553ea55e2da6a4f3b15f4c0fa40f2f0d1","https://git.kernel.org/stable/c/858aa4965ffa8c0d4bb5dd835ac4f1c9a1dcab85","https://git.kernel.org/stable/c/452a8467be8143747292218212671deeb186d2ae"],"weaknesses":[],"ingestedAt":"2026-10-30T12:46:06.359Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/72xxx/CVE-2026-72162.json","commit":"1f312381e38164a43607eebab851b151dd16861e","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-72162","state":"PUBLISHED","datePublished":"2026-08-15T05:53:30.420Z","dateUpdated":"2026-10-30T12:28:52.281Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-08-09T03:40:39.909Z"},"containers":{"cna":{"title":"ocfs2: fix UBSAN array-index-out-of-bounds in ocfs2_sum_rightmost_rec","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2: fix UBSAN array-index-out-of-bounds in ocfs2_sum_rightmost_rec\n\n[BUG]\nOn-disk corruption setting l_next_free_rec to 0 in an inode's embedded\nextent list triggers a UBSAN panic on the next write to that file.\n\n[CAUSE]\nocfs2_sum_rightmost_rec() computes\ni = le16_to_cpu(el->l_next_free_rec) - 1\nand accesses el->l_recs[i] without validating i. When l_next_free_rec\nis 0, i becomes -1; when l_next_free_rec exceeds l_count, i falls\npast the end of the array. Either case violates the\n__counted_by_le(l_count) annotation on l_recs[] and triggers UBSAN.\n\n[FIX]\nValidate the inode's embedded extent list when the inode is read, in\nocfs2_validate_inode_block(): l_count must be non-zero and no larger\nthan the inode block can hold, and l_next_free_rec must not exceed\nl_count. A corrupt list is rejected at read time, before the b-tree\ncode can index l_recs[] out of bounds."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"dcd0538ff4e854fa9d7f4630b359ca8fdb5cb5a8","status":"affected","lessThan":"c88226315aec298894ec57e532f5e95f3b09e874","versionType":"git"},{"version":"dcd0538ff4e854fa9d7f4630b359ca8fdb5cb5a8","status":"affected","lessThan":"c286319746cef02bcce7384fda3a3f08989070d2","versionType":"git"},{"version":"dcd0538ff4e854fa9d7f4630b359ca8fdb5cb5a8","status":"affected","lessThan":"720fb324cf0f5116318cae7f75cb393d118ffb67","versionType":"git"},{"version":"dcd0538ff4e854fa9d7f4630b359ca8fdb5cb5a8","status":"affected","lessThan":"671889c553ea55e2da6a4f3b15f4c0fa40f2f0d1","versionType":"git"},{"version":"dcd0538ff4e854fa9d7f4630b359ca8fdb5cb5a8","status":"affected","lessThan":"858aa4965ffa8c0d4bb5dd835ac4f1c9a1dcab85","versionType":"git"},{"version":"dcd0538ff4e854fa9d7f4630b359ca8fdb5cb5a8","status":"affected","lessThan":"452a8467be8143747292218212671deeb186d2ae","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ocfs2/inode.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.22","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.22","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.160","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.114","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.40","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.5","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ocfs2/inode.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/c88226315aec298894ec57e532f5e95f3b09e874"},{"url":"https://git.kernel.org/stable/c/c286319746cef02bcce7384fda3a3f08989070d2"},{"url":"https://git.kernel.org/stable/c/720fb324cf0f5116318cae7f75cb393d118ffb67"},{"url":"https://git.kernel.org/stable/c/671889c553ea55e2da6a4f3b15f4c0fa40f2f0d1"},{"url":"https://git.kernel.org/stable/c/858aa4965ffa8c0d4bb5dd835ac4f1c9a1dcab85"},{"url":"https://git.kernel.org/stable/c/452a8467be8143747292218212671deeb186d2ae"}],"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 via local VFS write paths on a mounted OCFS2 volume (write/mmap extending allocation), not from network packet handling or remote protocols; exploitation requires local syscall access to a mounted filesystem.\nAC:L - An attacker can reliably craft on-disk inode metadata (e.g., l_next_free_rec=0) in an OCFS2 image and trigger btree growth with a normal extending write; syzkaller reproduced this deterministically without races or victim-specific timing.\nPR:L - Full exploitation requires mounting a crafted OCFS2 image and writing to it; CAP_SYS_ADMIN for mount/loop setup is obtainable by an unprivileged user via user namespaces, matching the low-privilege bar used for comparable OCFS2 corruption CVEs.\nUI:N - No victim interaction is required when the attacker crafts the corrupt image, mounts it (including via user namespace), and performs the triggering write themselves; no third party must open files or take other actions.\nS:U - Impact is confined to kernel memory/filesystem integrity on the host processing the corrupt OCFS2 metadata; it does not cross VM, container, or IOMMU security boundaries into another authority.\nC:H - The flaw is an out-of-bounds read of extent records from attacker-controlled on-disk fields; even when UBSAN traps, the invalid index access can expose adjacent inode metadata and is classed as information-disclosure-capable memory corruption.\nI:H - The out-of-bounds sum feeds btree growth/shift logic that writes derived cluster counts and tree pointers back to disk, enabling attacker-influenced metadata corruption beyond the immediate read primitive.\nA:H - On UBSAN-enabled kernels the invalid array index triggers a kernel panic on write; even without UBSAN, corrupt btree updates from the bad sum can crash or destabilize the system, satisfying high availability impact."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-30T12:28:52.281Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.22","versionEndExcluding":"6.1.191"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.22","versionEndExcluding":"6.6.160"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.22","versionEndExcluding":"6.12.114"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.22","versionEndExcluding":"6.18.40"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.22","versionEndExcluding":"7.1.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.22","versionEndExcluding":"7.2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}