exfat: validate cluster allocation bits of the allocation bitmap
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.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.1.183, 6.12.58, 6.17.8, 6.6.148
- CVEs
- CVE-2025-40307
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 6 Nov 2026, 01:43 UTC · Revision 1
Source evidence
exfat: validate cluster allocation bits of the allocation bitmap
core-osv · Original sourcePublished 8 Dec 2025, 00:46 UTC
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.
osv:CVE-2025-40307
Kernel
Fixed versions: 6.1.183, 6.6.148, 6.12.58, 6.17.8
Complete source record
{
"id": "b961c713af55e53830bd6f9d14cc6ecc63fe7b32cdaac68869adac1d0f5f4a7a",
"url": "https://osv.dev/vulnerability/CVE-2025-40307",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "exfat: validate cluster allocation bits of the allocation bitmap",
"summary": "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.",
"evidence": "osv:CVE-2025-40307",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.1.183",
"evidence": "/affected/1/ranges"
},
{
"value": "6.6.148",
"evidence": "/affected/1/ranges"
},
{
"value": "6.12.58",
"evidence": "/affected/1/ranges"
},
{
"value": "6.17.8",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "CVE-2025-40307",
"aliases": [
"CVE-2025-40307"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "1acf1a564b6034b5af1e7fb23cb98cb3bb4f6003"
},
{
"fixed": "87f827d53bd0688597bda63ae95908e2ad39bac0"
},
{
"fixed": "67ce8034dc0278ddd88cad93d4218a945180dddd"
},
{
"fixed": "6bc58b4c53795ab5fe00648344aa7d9d61175f90"
},
{
"fixed": "13c1d24803d5b0446b3f6f0fdd67e07ac1fdc7bf"
},
{
"fixed": "79c1587b6cda74deb0c86fc7ba194b92958c793c"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40307.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.7.0"
},
{
"fixed": "6.1.183"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.6.148"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.0"
},
{
"fixed": "6.12.58"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.17.8"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40307.json"
}
}
],
"modified": "2026-10-28T02:30:46.200012796Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/13c1d24803d5b0446b3f6f0fdd67e07ac1fdc7bf",
"https://git.kernel.org/stable/c/67ce8034dc0278ddd88cad93d4218a945180dddd",
"https://git.kernel.org/stable/c/6bc58b4c53795ab5fe00648344aa7d9d61175f90",
"https://git.kernel.org/stable/c/79c1587b6cda74deb0c86fc7ba194b92958c793c",
"https://git.kernel.org/stable/c/87f827d53bd0688597bda63ae95908e2ad39bac0",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40307.json",
"https://nvd.nist.gov/vuln/detail/CVE-2025-40307",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40307.json"
}
},
"related_cves": [
{
"value": "CVE-2025-40307",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 513969,
"published_at": "2025-12-08T00:46:32.659+00:00"
}