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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: None; User interaction: Required; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.25% (percentile 10, 2026-11-26)
- **Published:** 2025-11-12T21:56:30.914Z
- **Modified:** 2026-10-19T21:10:00.160Z

## Who should check

- Anyone running Linux \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< ea39e712c2f5ae148ee5515798ae03523673e002; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 1cfb3e4ddbdc8e02e637b8852540bd4718bf4814; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 505e69f76ac497e788f4ea0267826ec7266b40c8; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 3d6269028246f4484bfed403c947a114bb583631; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 79ea7f3e11effe1bd9e753172981d9029133a278; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 6b879c4c6bbaab03c0ad2a983953bd1410bb165e; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 440b003f449a4ff2a00b08c8eab9ba5cd28f3943; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 57295e835408d8d425bef58da5253465db3d6888; \< 5.4.301; \< 5.10.246; …
- Anyone running Linux all versions

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

## Affected and fixed versions

- Linux: \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< ea39e712c2f5ae148ee5515798ae03523673e002; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 1cfb3e4ddbdc8e02e637b8852540bd4718bf4814; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 505e69f76ac497e788f4ea0267826ec7266b40c8; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 3d6269028246f4484bfed403c947a114bb583631; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 79ea7f3e11effe1bd9e753172981d9029133a278; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 6b879c4c6bbaab03c0ad2a983953bd1410bb165e; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 440b003f449a4ff2a00b08c8eab9ba5cd28f3943; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 57295e835408d8d425bef58da5253465db3d6888; \< 5.4.301; \< 5.10.246; … (cvelist)
- Linux: all versions (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-40190. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-40190.md
Affected: Linux >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < ea39e712c2f5ae148ee5515798ae03523673e002; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 1cfb3e4ddbdc8e02e637b8852540bd4718bf4814; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 505e69f76ac497e788f4ea0267826ec7266b40c8; >= 1da177e4c3f41524e886b7f…
Fixed in: Linux 1cfb3e4ddbdc8e02e637b8852540bd4718bf4814, Linux 505e69f76ac497e788f4ea0267826ec7266b40c8, Linux 3d6269028246f4484bfed403c947a114bb583631, Linux 79ea7f3e11effe1bd9e753172981d9029133a278, Linux 6b879c4c6bbaab03c0ad2a983953bd1410bb165e, Linux 440b003f449a4ff2a00b08c8eab9ba5cd28f3943, Linux 57295…

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-40190 being exploited?

There is no confirmed exploitation: CVE-2025-40190 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.25% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-40190?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2025-40190?

Linux \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< ea39e712c2f5ae148ee5515798ae03523673e002; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 1cfb3e4ddbdc8e02e637b8852540bd4718bf4814; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 505e69f76ac497e788f4ea0267826ec7266b40c8; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 3d6269028246f4484bfed403c947a114bb583631; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 79ea7f3e11effe1bd9e753172981d9029133a278; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 6b879c4c6bbaab03c0ad2a983953bd1410bb165e; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 440b003f449a4ff2a00b08c8eab9ba5cd28f3943; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 57295e835408d8d425bef58da5253465db3d6888; \< 5.4.301; \< 5.10.246; …; Linux all versions.

### Is there a fix for CVE-2025-40190?

Yes. Fixed in Linux 1cfb3e4ddbdc8e02e637b8852540bd4718bf4814, Linux 505e69f76ac497e788f4ea0267826ec7266b40c8, Linux 3d6269028246f4484bfed403c947a114bb583631, Linux 79ea7f3e11effe1bd9e753172981d9029133a278, Linux 6b879c4c6bbaab03c0ad2a983953bd1410bb165e, Linux 440b003f449a4ff2a00b08c8eab9ba5cd28f3943, Linux 57295e835408d8d425bef58da5253465db3d6888, Linux 5.4.301, Linux 5.10.246. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2025-40190?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/ea39e712c2f5ae148ee5515798ae03523673e002>
- other: <https://git.kernel.org/stable/c/1cfb3e4ddbdc8e02e637b8852540bd4718bf4814>
- other: <https://git.kernel.org/stable/c/505e69f76ac497e788f4ea0267826ec7266b40c8>
- other: <https://git.kernel.org/stable/c/3d6269028246f4484bfed403c947a114bb583631>
- other: <https://git.kernel.org/stable/c/79ea7f3e11effe1bd9e753172981d9029133a278>
- other: <https://git.kernel.org/stable/c/6b879c4c6bbaab03c0ad2a983953bd1410bb165e>
- other: <https://git.kernel.org/stable/c/440b003f449a4ff2a00b08c8eab9ba5cd28f3943>
- other: <https://git.kernel.org/stable/c/57295e835408d8d425bef58da5253465db3d6888>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-40190>

HTML: <https://flawdb.com/CVE-2025-40190> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-40190>
