Description
In the Linux kernel, the following vulnerability has been resolved:

ocfs2: reject dinodes with non-canonical i_mode 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 ocfs2_populate_inode() copies
them into the in-core inode.

The checks cover:

- i_mode values whose type bits do not name a canonical POSIX file
type;
- non-device dinodes whose id1.dev1.i_rdev field is non-zero; and
- non-inline dinodes that claim non-zero i_size while i_clusters is
zero, covering directories unconditionally and regular files on
non-sparse volumes.

The normal read path reports these through ocfs2_error(), 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 OCFS2_FILECHECK_ERR_INVALIDINO instead
of calling ocfs2_error().


This patch (of 3):

ocfs2_validate_inode_block() currently accepts any non-zero i_mode value.
ocfs2_populate_inode() then copies that mode verbatim into inode->i_mode
and dispatches on i_mode & S_IFMT to the file/dir/symlink/special_file
iops; an unrecognised type falls through to ocfs2_special_file_iops and
init_special_inode().

Reject dinodes whose type bits do not name one of the seven canonical
POSIX file types. Use fs_umode_to_ftype(), 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 i_mode
through the filecheck logger and OCFS2_FILECHECK_ERR_INVALIDINO instead of
calling ocfs2_error(), but it must not allow a malformed dinode to proceed
into ocfs2_populate_inode().
Published: 2026-08-15
Score: 8.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The Linux kernel’s OCFS2 cluster file system previously allowed malformed on‑disk inode structures called dinodes to be accepted and copied into kernel memory without validation. A dinode whose i_mode bits do not match one of the seven canonical POSIX file types, a non‑device rdev field set when it should be zero, or a size mismatch could cause the kernel to invoke special‑file handlers or otherwise crash. The patch series added structural checks that reject any dinode whose type bits do not belong to a canonical POSIX file type, validates rdev fields for non‑device inodes, and enforces size consistency before populating an inode, thereby preventing a kernel panic.

Affected Systems

Affected systems: The CNA lists only “Linux:Linux” with no version details, indicating that any Linux distribution shipping the generic kernel with the OCFS2 file system enabled is potentially vulnerable. In particular, systems running older kernel releases prior to the inclusion of the ocfs2 hardening patch series (v2) are at risk. Because the vulnerability resides in the kernel’s OCFS2 implementation, the issue persists across all kernel configurations that load the ocfs2 module, regardless of whether the file system is actively mounted.

Risk and Exploitability

The CVSS score of 8.8 indicates high severity due to a denial‑of‑service impact. The EPSS score is listed as < 1 %, showing a very low but non‑zero probability of exploitation. The vulnerability is not currently catalogued in CISA’s KEV catalogue, but an attacker who can write crafted metadata to an OCFS2 volume could trigger a kernel crash by causing the system to read the forged dinode. Consequently, the risk is high if the volume is writable by an attacker, moderate if write access is restricted, and negligible in a read‑only environment.

Generated by OpenCVE AI on August 18, 2026 at 20:26 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the latest kernel update that includes the ocfs2 hardening patch series for inode validation.
  • Restrict write permissions to OCFS2 data and journal volumes to trusted system administrators only.
  • If a kernel upgrade is not immediately feasible, mount OCFS2 file systems in read‑only mode during periods when the data is not actively accessed to prevent ingestion of forged metadata.

Generated by OpenCVE AI on August 18, 2026 at 20:26 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 18 Aug 2026 16:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-20

Tue, 18 Aug 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-1286
References
Metrics threat_severity

None

threat_severity

Moderate


Mon, 17 Aug 2026 06:00:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}


Sat, 15 Aug 2026 20:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-20

Sat, 15 Aug 2026 06:00:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: ocfs2: reject dinodes with non-canonical i_mode 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 ocfs2_populate_inode() copies them into the in-core inode. The checks cover: - i_mode values whose type bits do not name a canonical POSIX file type; - non-device dinodes whose id1.dev1.i_rdev field is non-zero; and - non-inline dinodes that claim non-zero i_size while i_clusters is zero, covering directories unconditionally and regular files on non-sparse volumes. The normal read path reports these through ocfs2_error(), 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 OCFS2_FILECHECK_ERR_INVALIDINO instead of calling ocfs2_error(). This patch (of 3): ocfs2_validate_inode_block() currently accepts any non-zero i_mode value. ocfs2_populate_inode() then copies that mode verbatim into inode->i_mode and dispatches on i_mode & S_IFMT to the file/dir/symlink/special_file iops; an unrecognised type falls through to ocfs2_special_file_iops and init_special_inode(). Reject dinodes whose type bits do not name one of the seven canonical POSIX file types. Use fs_umode_to_ftype(), 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 i_mode through the filecheck logger and OCFS2_FILECHECK_ERR_INVALIDINO instead of calling ocfs2_error(), but it must not allow a malformed dinode to proceed into ocfs2_populate_inode().
Title ocfs2: reject dinodes with non-canonical i_mode type
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-08-17T05:41:03.822Z

Reserved: 2026-08-09T03:40:39.909Z

Link: CVE-2026-72160

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-15T06:21:33.850

Modified: 2026-08-17T06:18:16.247

Link: CVE-2026-72160

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-08-15T00:00:00Z

Links: CVE-2026-72160 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-18T20:30:17Z

Weaknesses
  • CWE-1286

    Improper Validation of Syntactic Correctness of Input