# CVE-2025-40287: exfat: fix improper check of dentry.stream.valid\_size

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

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.27% (percentile 13, 2026-11-26)
- **Published:** 2025-12-06T21:51:13.328Z
- **Modified:** 2026-10-15T19:10:00.173Z

## Who should check

- Anyone running Linux \>= 11a347fb6cef62ce47e84b97c45f2b2497c7593b, \< 6c627bcc1896ba62ec793d0c00da74f3c93ce3ad; \>= 11a347fb6cef62ce47e84b97c45f2b2497c7593b, \< 204b1b02ee018ba52ad2ece21fe3a8643d66a1b2; \>= 11a347fb6cef62ce47e84b97c45f2b2497c7593b, \< 82ebecdc74ff555daf70b811d854b1f32a296bea
- Anyone running Linux 6.8

## Description

In the Linux kernel, the following vulnerability has been resolved:

exfat: fix improper check of dentry.stream.valid\_size

We found an infinite loop bug in the exFAT file system that can lead to a
Denial-of-Service (DoS) condition. When a dentry in an exFAT filesystem is
malformed, the following system calls — SYS\_openat, SYS\_ftruncate, and
SYS\_pwrite64 — can cause the kernel to hang.

Root cause analysis shows that the size validation code in exfat\_find()
does not check whether dentry.stream.valid\_size is negative. As a result,
the system calls mentioned above can succeed and eventually trigger the DoS
issue.

This patch adds a check for negative dentry.stream.valid\_size to prevent
this vulnerability.

## Affected and fixed versions

- Linux: \>= 11a347fb6cef62ce47e84b97c45f2b2497c7593b, \< 6c627bcc1896ba62ec793d0c00da74f3c93ce3ad; \>= 11a347fb6cef62ce47e84b97c45f2b2497c7593b, \< 204b1b02ee018ba52ad2ece21fe3a8643d66a1b2; \>= 11a347fb6cef62ce47e84b97c45f2b2497c7593b, \< 82ebecdc74ff555daf70b811d854b1f32a296bea (cvelist)
- Linux: 6.8 (cvelist)

## Mitigation

- Upgrade Linux to 82ebecdc74ff555daf70b811d854b1f32a296bea or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-40287.md
Affected: Linux >= 11a347fb6cef62ce47e84b97c45f2b2497c7593b, < 6c627bcc1896ba62ec793d0c00da74f3c93ce3ad; >= 11a347fb6cef62ce47e84b97c45f2b2497c7593b, < 204b1b02ee018ba52ad2ece21fe3a8643d66a1b2; >= 11a347fb6cef62ce47e84b97c45f2b2497c7593b, < 82ebecdc74ff555daf70b811d854b1f32a296bea; Linux 6.8
Fixed in: Linux 6c627bcc1896ba62ec793d0c00da74f3c93ce3ad, Linux 204b1b02ee018ba52ad2ece21fe3a8643d66a1b2, Linux 82ebecdc74ff555daf70b811d854b1f32a296bea

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-40287 being exploited?

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

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

It has no CVSS score yet. Unknown.

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

Linux \>= 11a347fb6cef62ce47e84b97c45f2b2497c7593b, \< 6c627bcc1896ba62ec793d0c00da74f3c93ce3ad; \>= 11a347fb6cef62ce47e84b97c45f2b2497c7593b, \< 204b1b02ee018ba52ad2ece21fe3a8643d66a1b2; \>= 11a347fb6cef62ce47e84b97c45f2b2497c7593b, \< 82ebecdc74ff555daf70b811d854b1f32a296bea; Linux 6.8.

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

Yes. Fixed in Linux 6c627bcc1896ba62ec793d0c00da74f3c93ce3ad, Linux 204b1b02ee018ba52ad2ece21fe3a8643d66a1b2, Linux 82ebecdc74ff555daf70b811d854b1f32a296bea. Upgrade Linux to 82ebecdc74ff555daf70b811d854b1f32a296bea or later.

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

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/6c627bcc1896ba62ec793d0c00da74f3c93ce3ad>
- other: <https://git.kernel.org/stable/c/204b1b02ee018ba52ad2ece21fe3a8643d66a1b2>
- other: <https://git.kernel.org/stable/c/82ebecdc74ff555daf70b811d854b1f32a296bea>

## 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-40287>

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