# CVE-2025-40307: exfat: validate cluster allocation bits of the allocation bitmap

> 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:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; 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.23% (percentile 8, 2026-11-26)
- **Published:** 2025-12-08T00:46:32.659Z
- **Modified:** 2026-10-15T22:19:07.553Z

## Who should check

- Anyone running Linux \>= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, \< 87f827d53bd0688597bda63ae95908e2ad39bac0; \>= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, \< 67ce8034dc0278ddd88cad93d4218a945180dddd; \>= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, \< 6bc58b4c53795ab5fe00648344aa7d9d61175f90; \>= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, \< 13c1d24803d5b0446b3f6f0fdd67e07ac1fdc7bf; \>= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, \< 79c1587b6cda74deb0c86fc7ba194b92958c793c
- Anyone running Linux 5.7

## Description

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

exfat: validate cluster allocation bits of the allocation bitmap

syzbot created an exfat image with cluster bits not set for the allocation
bitmap. exfat-fs reads and uses the allocation bitmap without checking
this. The problem is that if the start cluster of the allocation bitmap
is 6, cluster 6 can be allocated when creating a directory with mkdir.
exfat zeros out this cluster in exfat\_mkdir, which can delete existing
entries. This can reallocate the allocated entries. In addition,
the allocation bitmap is also zeroed out, so cluster 6 can be reallocated.
This patch adds exfat\_test\_bitmap\_range to validate that clusters used for
the allocation bitmap are correctly marked as in-use.

## Affected and fixed versions

- Linux: \>= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, \< 87f827d53bd0688597bda63ae95908e2ad39bac0; \>= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, \< 67ce8034dc0278ddd88cad93d4218a945180dddd; \>= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, \< 6bc58b4c53795ab5fe00648344aa7d9d61175f90; \>= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, \< 13c1d24803d5b0446b3f6f0fdd67e07ac1fdc7bf; \>= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, \< 79c1587b6cda74deb0c86fc7ba194b92958c793c (cvelist)
- Linux: 5.7 (cvelist)

## Mitigation

- Upgrade Linux to 79c1587b6cda74deb0c86fc7ba194b92958c793c 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-40307. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-40307.md
Affected: Linux >= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, < 87f827d53bd0688597bda63ae95908e2ad39bac0; >= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, < 67ce8034dc0278ddd88cad93d4218a945180dddd; >= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, < 6bc58b4c53795ab5fe00648344aa7d9d61175f90; >= 1acf1a564b6034b5af1e7fb…
Fixed in: Linux 87f827d53bd0688597bda63ae95908e2ad39bac0, Linux 67ce8034dc0278ddd88cad93d4218a945180dddd, Linux 6bc58b4c53795ab5fe00648344aa7d9d61175f90, Linux 13c1d24803d5b0446b3f6f0fdd67e07ac1fdc7bf, Linux 79c1587b6cda74deb0c86fc7ba194b92958c793c

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

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

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

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, \< 87f827d53bd0688597bda63ae95908e2ad39bac0; \>= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, \< 67ce8034dc0278ddd88cad93d4218a945180dddd; \>= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, \< 6bc58b4c53795ab5fe00648344aa7d9d61175f90; \>= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, \< 13c1d24803d5b0446b3f6f0fdd67e07ac1fdc7bf; \>= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, \< 79c1587b6cda74deb0c86fc7ba194b92958c793c; Linux 5.7.

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

Yes. Fixed in Linux 87f827d53bd0688597bda63ae95908e2ad39bac0, Linux 67ce8034dc0278ddd88cad93d4218a945180dddd, Linux 6bc58b4c53795ab5fe00648344aa7d9d61175f90, Linux 13c1d24803d5b0446b3f6f0fdd67e07ac1fdc7bf, Linux 79c1587b6cda74deb0c86fc7ba194b92958c793c. Upgrade Linux to 79c1587b6cda74deb0c86fc7ba194b92958c793c or later.

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

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/87f827d53bd0688597bda63ae95908e2ad39bac0>
- other: <https://git.kernel.org/stable/c/67ce8034dc0278ddd88cad93d4218a945180dddd>
- other: <https://git.kernel.org/stable/c/6bc58b4c53795ab5fe00648344aa7d9d61175f90>
- other: <https://git.kernel.org/stable/c/13c1d24803d5b0446b3f6f0fdd67e07ac1fdc7bf>
- other: <https://git.kernel.org/stable/c/79c1587b6cda74deb0c86fc7ba194b92958c793c>

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

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