CVE-2025-40307
exfat: validate cluster allocation bits of the allocation bitmap
Mitigation
- Upgrade Linux to 79c1587b6cda74deb0c86fc7ba194b92958c793c or later.
Who should check
- Anyone running Linux >= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, < 87f827d53bd0688597bda63ae95908e2ad39bac0; >= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, < 67ce8034dc0278ddd88cad93d4218a945180dddd; >= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, < 6bc58b4c53795ab5fe00648344aa7d9d61175f90; >= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, < 13c1d24803d5b0446b3f6f0fdd67e07ac1fdc7bf; >= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, < 79c1587b6cda74deb0c86fc7ba194b92958c793c
- Anyone running Linux 5.7
Vulnerability facts
- Affected
- Linux >= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, < 87f827d53bd0688597bda63ae95908e2ad39bac0; >= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, < 67ce8034dc0278ddd88cad93d4218a945180dddd; >= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, < 6bc58b4c53795ab5fe00648344aa7d9d61175f90; >= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, < 13c1d24803d5b0446b3f6f0fdd67e07ac1fdc7bf; >= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, < 79c1587b6cda74deb0c86fc7ba194b92958c793c; Linux 5.7
- Fixed in
- Linux 87f827d53bd0688597bda63ae95908e2ad39bac0, Linux 67ce8034dc0278ddd88cad93d4218a945180dddd, Linux 6bc58b4c53795ab5fe00648344aa7d9d61175f90, Linux 13c1d24803d5b0446b3f6f0fdd67e07ac1fdc7bf, Linux 79c1587b6cda74deb0c86fc7ba194b92958c793c
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 7.8 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 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
- EPSS
- 0.23% chance of exploitation in 30 days (percentile 8, 2026-11-26)
- Modified
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
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, < 87f827d53bd0688597bda63ae95908e2ad39bac0; >= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, < 67ce8034dc0278ddd88cad93d4218a945180dddd; >= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, < 6bc58b4c53795ab5fe00648344aa7d9d61175f90; >= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, < 13c1d24803d5b0446b3f6f0fdd67e07ac1fdc7bf; >= 1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003, < 79c1587b6cda74deb0c86fc7ba194b92958c793c | — | cvelist |
| Linux | 5.7 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
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.
References
Other
- https://git.kernel.org/stable/c/87f827d53bd0688597bda63ae95908e2ad39bac0
- https://git.kernel.org/stable/c/67ce8034dc0278ddd88cad93d4218a945180dddd
- https://git.kernel.org/stable/c/6bc58b4c53795ab5fe00648344aa7d9d61175f90
- https://git.kernel.org/stable/c/13c1d24803d5b0446b3f6f0fdd67e07ac1fdc7bf
- https://git.kernel.org/stable/c/79c1587b6cda74deb0c86fc7ba194b92958c793c
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.