CVE-2026-72160: ocfs2: reject dinodes with non-canonical i_mode type
In the Linux kernel, the following vulnerability has been resolved:
ocfs2: reject dinodes with non-canonical imode type
Patch series "ocfs2: harden inode validators against forged metadata", v2.
This series adds three structural checks to OCFS2 dinode validation so malformed on-disk fields are rejected before ocfs2populateinode() copies them into the in-core inode.
The checks cover:
- imode values whose type bits do not name a canonical POSIX file type; - non-device dinodes whose id1.dev1.irdev field is non-zero; and - non-inline dinodes that claim non-zero isize while iclusters is zero, covering directories unconditionally and regular files on non-sparse volumes.
The normal read path reports these through ocfs2error(), matching the existing suballoc-slot, inline-data, chain-list, and refcount checks. The online filecheck path uses the same structural predicates but keeps its own reporting contract, returning OCFS2FILECHECKERRINVALIDINO instead of calling ocfs2error().
This patch (of 3):
ocfs2validateinodeblock() currently accepts any non-zero imode value. ocfs2populateinode() then copies that mode verbatim into inode->imode and dispatches on imode & SIFMT to the file/dir/symlink/specialfile iops; an unrecognised type falls through to ocfs2specialfileiops and initspecialinode().
Reject dinodes whose type bits do not name one of the seven canonical POSIX file types. Use fsumodetoftype(), the same generic file-type conversion helper OCFS2 already uses for directory entries, so the accepted inode type set matches the kernel file-type vocabulary instead of open-coding a local switch.
Apply the same structural check to the online filecheck read path. filecheck keeps its own error namespace, so it reports malformed imode through the filecheck logger and OCFS2FILECHECKERRINVALIDINO instead of calling ocfs2error(), but it must not allow a malformed dinode to proceed into ocfs2populateinode().
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-72160?
CVE-2026-72160 has a risk score of 37, indicating a moderate level of severity.
How do I fix CVE-2026-72160?
To fix CVE-2026-72160, update your Linux kernel to the latest version that contains the patch for this vulnerability.
What systems are affected by CVE-2026-72160?
CVE-2026-72160 affects systems running vulnerable versions of the Linux kernel that utilize the OCFS2 filesystem.
What vulnerability does CVE-2026-72160 address?
CVE-2026-72160 addresses the issue of rejecting dinodes with non-canonical i_mode types in the OCFS2 filesystem.
When was CVE-2026-72160 published?
CVE-2026-72160 was published on August 15, 2026.