VYPR
Unrated severityNVD Advisory· Published Nov 12, 2025· Updated Apr 15, 2026

CVE-2025-40190

CVE-2025-40190

Description

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 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.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

In the Linux kernel's ext4 filesystem, a missing refcount check in xattr EA inode updates allows refcount underflow, leading to -1, leading to corruption errors.

Vulnerability

In the Linux kernel's ext4 filesystem, the function ext4_xattr_inode_update_ref() in fs/ext4/xattr.c updates the reference count of an inode's refcount without first verifying that the current refcount is positive. When ext4_xattr_inode_update_ref() reads a refcount that is already <= 0 and then applies a ref_change (often -1), the refcount can underflow to -1. This triggers errors like EXT4-fs error: EA inode ref underflow: ref_count=-1 ref_change=-1 and EXT4-fs warning: ea_inode dec ref err=-117 [1].

Exploitation

The vulnerability is triggered during xattr update operations on an ext4 filesystem. An attacker with the ability to mount a crafted ext4 filesystem (e or to trigger xattr operations on a filesystem with corrupted EA inodes can cause the refcount underflow. No special privileges are required beyond the ability to perform xattr operations on the filesystem [2]. ].

Impact

An attacker can cause a refcount underflow, leading to filesystem corruption and potential denial of service. The kernel may emit error messages and the filesystem may become inconsistent, potentially requiring fsck to repair. The underflow can also lead to orphan inode cleanup churn [1].

Mitigation

The fix adds an explicit check: if the current refcount is non-positive, treat it as on-disk corruption, emit ext4_error_inode(), and fail the operation with -EFSCORRUPTED instead of updating the refcount. The WARN_ONCE() is removed as negative refcounts are now impossible. The patch has been applied to the stable kernel tree [1][2][3].

AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

3

Patches

8

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

8

News mentions

0

No linked articles in our index yet.