CVE-2025-40190: ext4: guard against EA inode refcount underflow in xattr update
In the Linux kernel, the following vulnerability has been resolved:
ext4: guard against EA inode refcount underflow in xattr update
syzkaller found a path where ext4_xattr_inode_update_ref() reads an EA
inode refcount that is already <= 0 and then applies ref_change (often
-1). That lets the refcount underflow and we proceed with a bogus value,
triggering errors like:
EXT4-fs error: EA inode <n> ref underflow: ref_count=-1 ref_change=-1
EXT4-fs warning: ea_inode dec ref err=-117
Make the invariant explicit: if the current refcount is non-positive,
treat this as on-disk corruption, emit ext4_error_inode(), and fail the
operation with -EFSCORRUPTED instead of updating the refcount. Delete the
WARN_ONCE() as negative refcounts are now impossible; keep error reporting
in ext4_error_inode().
This prevents the underflow and the follow-on orphan/cleanup churn.
Security readout for executives and security teams
Plain-English summary
A flaw in Linux ext4 extended-attribute handling can mishandle an already invalid reference count, causing filesystem errors and potentially serious confidentiality, integrity, or availability impact. Triggering requires local access and user interaction according to the supplied CVSS vector. The available evidence does not establish remote or active exploitation.
Executive priority
Treat this as a high-priority kernel maintenance issue, especially on ext4-dependent systems exposed to untrusted storage or filesystem content. It is not supported as an emergency active-exploitation event. Use vendor package guidance because the source bundle does not map every distribution release or explicitly identify corrected package versions.
Technical view
During an extended-attribute update, ext4_xattr_inode_update_ref() could decrement an EA inode reference count already at zero or below. The resulting underflow allowed bogus state and follow-on orphan or cleanup activity. The kernel fix treats a non-positive count as filesystem corruption, reports the error, and returns -EFSCORRUPTED without modifying the count.
Likely exposure
Exposure concerns Linux systems running the listed affected kernel releases and using ext4 where corrupted EA inode metadata reaches an extended-attribute update. The bundle lists 5.4.301, 5.10.246, 5.15.195, 6.1.157, 6.6.113, 6.12.54, 6.17.4, and 6.18 as affected. Exact distribution package mappings are not provided.
Exploitation context
CISA KEV status is false, and the supplied sources provide no evidence of exploitation in the wild or a public exploit. The CVSS 3.1 vector scores 7.8 and indicates local access, low complexity, no privileges, and required user interaction. How an attacker would reliably create or reach the corrupt metadata is not established here.
Researcher notes
The key invariant is that an EA inode reference count must be positive before applying ref_change. The fix converts an invalid count into an explicit corruption failure instead of permitting arithmetic underflow. Syzkaller discovered the path. No CWE is assigned, and the supplied evidence does not demonstrate a reliable security boundary crossing or exploitation chain.
Mitigation direction
Inventory Linux kernel versions and identify systems using ext4 filesystems.
Check distribution or kernel-vendor advisories for corrected package versions.
Apply a vendor-supported kernel containing the referenced ext4 fix.
Prioritize systems handling potentially corrupted or externally supplied ext4 storage.
Reboot into the corrected kernel and confirm the running version.
Validation and detection
Compare running kernel versions with vendor advisories and the supplied affected-version list.
Confirm deployed kernel sources include the non-positive EA inode refcount guard.
Review kernel logs for EA inode ref underflow or ea_inode decrement errors.
Verify ext4 workloads remain healthy after upgrading and rebooting.
Confirm vulnerability scanners recognize the distribution's patched package backport.
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-40190 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.