CVE-2025-40167: ext4: detect invalid INLINE_DATA + EXTENTS flag combination
In the Linux kernel, the following vulnerability has been resolved:
ext4: detect invalid INLINE_DATA + EXTENTS flag combination
syzbot reported a BUG_ON in ext4_es_cache_extent() when opening a verity
file on a corrupted ext4 filesystem mounted without a journal.
The issue is that the filesystem has an inode with both the INLINE_DATA
and EXTENTS flags set:
EXT4-fs error (device loop0): ext4_cache_extents:545: inode #15:
comm syz.0.17: corrupted extent tree: lblk 0 < prev 66
Investigation revealed that the inode has both flags set:
DEBUG: inode 15 - flag=1, i_inline_off=164, has_inline=1, extents_flag=1
This is an invalid combination since an inode should have either:
- INLINE_DATA: data stored directly in the inode
- EXTENTS: data stored in extent-mapped blocks
Having both flags causes ext4_has_inline_data() to return true, skipping
extent tree validation in __ext4_iget(). The unvalidated out-of-order
extents then trigger a BUG_ON in ext4_es_cache_extent() due to integer
underflow when calculating hole sizes.
Fix this by detecting this invalid flag combination early in ext4_iget()
and rejecting the corrupted inode.
Security readout for executives and security teams
Plain-English summary
A corrupted ext4 filesystem can present an inode with two incompatible storage flags. When Linux opens an affected verity file under the described conditions, the kernel can hit a fatal assertion, potentially crashing the system. Systems that mount untrusted or damaged ext4 media face the clearest risk.
Executive priority
Prioritize internet-facing infrastructure platforms, image-processing services, and shared systems that mount untrusted ext4 content. For systems limited to trusted, managed storage, schedule the vendor kernel update through normal expedited patching while monitoring for revised vendor guidance.
Technical view
The incompatible INLINE_DATA and EXTENTS flags bypass extent-tree validation in __ext4_iget(). Out-of-order extents can then cause integer underflow during hole-size calculation and trigger BUG_ON in ext4_es_cache_extent(). The fix rejects the invalid flag combination when loading the inode.
Likely exposure
Exposure requires an affected Linux kernel to process a specially corrupted ext4 filesystem, specifically involving a verity file mounted without a journal. Risk is higher for systems mounting user-controlled images, removable media, or potentially damaged volumes. The supplied affected-version data is ambiguous, so distribution-specific status requires confirmation.
Exploitation context
The bundle identifies syzbot discovery but provides no evidence of malicious exploitation. CVE-2025-40167 is not marked KEV. The CVSS vector describes local access and user interaction; it does not indicate a remotely reachable network attack.
Researcher notes
The described failure most directly supports a kernel crash or denial-of-service condition. Although the supplied CVSS assigns high confidentiality, integrity, and availability impact, the narrative does not explain data disclosure or modification. Exact vulnerable branch boundaries should be verified against vendor advisories and the referenced stable commits.
Mitigation direction
Upgrade to a vendor kernel containing the applicable referenced stable fix.
Check distribution security guidance for exact affected and fixed package versions.
Restrict mounting of untrusted ext4 images or removable filesystems until patched.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2025-40167 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
0ADP providers
9Source links
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.