# CVE-2025-40190: ext4: guard against EA inode refcount underflow in xattr update

- Priority: **Routine**
- Reason: Not severe (CVSS 7.8, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-11-12 · Modified: 2026-08-05
- Aliases: UBUNTU-CVE-2025-40190, DEBIAN-CVE-2025-40190
- Record: https://cvemate.com/vulnerability/CVE-2025-40190 · JSON: https://cvemate.com/vulnerability/CVE-2025-40190/json

## Description

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

## Signals

- CVSS: 7.8 high (v3.1, CVE.org) CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- EPSS: 0.178%, percentile 7.641%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 171)

- debian linux (Debian): \< 6.1.158-1 \| \< 6.12.57-1 \| \< 6.17.6-1
- ubuntu linux (Ubuntu): All versions (No fix recorded)
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.4 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.14 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.17 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-7.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-fips (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-hwe (Ubuntu): All versions (No fix recorded)

## References

- <https://git.kernel.org/stable/c/ea39e712c2f5ae148ee5515798ae03523673e002>
- <https://git.kernel.org/stable/c/1cfb3e4ddbdc8e02e637b8852540bd4718bf4814>
- <https://git.kernel.org/stable/c/505e69f76ac497e788f4ea0267826ec7266b40c8>
- <https://git.kernel.org/stable/c/3d6269028246f4484bfed403c947a114bb583631>
- <https://git.kernel.org/stable/c/79ea7f3e11effe1bd9e753172981d9029133a278>
- <https://git.kernel.org/stable/c/6b879c4c6bbaab03c0ad2a983953bd1410bb165e>
- <https://git.kernel.org/stable/c/440b003f449a4ff2a00b08c8eab9ba5cd28f3943>
- <https://git.kernel.org/stable/c/57295e835408d8d425bef58da5253465db3d6888>
- <https://ubuntu.com/security/CVE-2025-40190>
- <https://www.cve.org/CVERecord?id=CVE-2025-40190>
- <https://git.kernel.org/linus/57295e835408d8d425bef58da5253465db3d6888>
- <https://security-tracker.debian.org/tracker/CVE-2025-40190>
- <https://nvd.nist.gov/vuln/detail/CVE-2025-40190>

---

Data as of 2026-12-05T04:22:27.458Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
