exfat: fix the infinite loop in exfat_readdir()
In the Linux kernel, the following vulnerability has been resolved: exfat: fix the infinite loop in exfat_readdir() If the file system is corrupted so that a cluster is linked to itself in the cluster chain, and there is an unused directory entry in the cluster, 'dentry' will not be incremented, causing condition 'dentry < max_dentries' unable to prevent an infinite loop. This infinite loop causes s_lock not to be released, and other tasks will hang, such as exfat_sync_fs(). This commit stops traversing the cluster chain when there is unused directory entry in the cluster to avoid this infinite loop.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 5.10.234, 5.15.177, 6.1.125, 6.12.10, 6.6.72
- CVEs
- CVE-2024-57940
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 7 Nov 2026, 01:02 UTC · Revision 1
Source evidence
exfat: fix the infinite loop in exfat_readdir()
core-osv · Original sourcePublished 21 Jan 2025, 12:18 UTC
In the Linux kernel, the following vulnerability has been resolved: exfat: fix the infinite loop in exfat_readdir() If the file system is corrupted so that a cluster is linked to itself in the cluster chain, and there is an unused directory entry in the cluster, 'dentry' will not be incremented, causing condition 'dentry < max_dentries' unable to prevent an infinite loop. This infinite loop causes s_lock not to be released, and other tasks will hang, such as exfat_sync_fs(). This commit stops traversing the cluster chain when there is unused directory entry in the cluster to avoid this infinite loop.
osv:CVE-2024-57940
Kernel
Fixed versions: 5.10.234, 5.15.177, 6.1.125, 6.6.72, 6.12.10
Complete source record
{
"id": "50e96c32ba2ea3b77fa12818b71bec44fe0e895626b33d5acf4514fa5b4b99c3",
"url": "https://osv.dev/vulnerability/CVE-2024-57940",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "exfat: fix the infinite loop in exfat_readdir()",
"summary": "In the Linux kernel, the following vulnerability has been resolved: exfat: fix the infinite loop in exfat_readdir() If the file system is corrupted so that a cluster is linked to itself in the cluster chain, and there is an unused directory entry in the cluster, 'dentry' will not be incremented, causing condition 'dentry < max_dentries' unable to prevent an infinite loop. This infinite loop causes s_lock not to be released, and other tasks will hang, such as exfat_sync_fs(). This commit stops traversing the cluster chain when there is unused directory entry in the cluster to avoid this infinite loop.",
"evidence": "osv:CVE-2024-57940",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.10.234",
"evidence": "/affected/1/ranges"
},
{
"value": "5.15.177",
"evidence": "/affected/1/ranges"
},
{
"value": "6.1.125",
"evidence": "/affected/1/ranges"
},
{
"value": "6.6.72",
"evidence": "/affected/1/ranges"
},
{
"value": "6.12.10",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2024-57940",
"aliases": [
"CVE-2024-57940"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "ca06197382bde0a3bc20215595d1c9ce20c6e341"
},
{
"fixed": "d8cfbb8723bd3d3222f360227a1cc15227189ca6"
},
{
"fixed": "28c21f0ac5293a4bf19b3e0e32005d6dd31a6c17"
},
{
"fixed": "31beabd0f47f8c3ed9965ba861c9e5b252d4920a"
},
{
"fixed": "dc1d7afceb982e8f666e70a582e6b5aa806de063"
},
{
"fixed": "d9ea94f5cd117d56e573696d0045ab3044185a15"
},
{
"fixed": "fee873761bd978d077d8c55334b4966ac4cb7b59"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-57940.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.7.0"
},
{
"fixed": "5.10.234"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.11.0"
},
{
"fixed": "5.15.177"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.16.0"
},
{
"fixed": "6.1.125"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.6.72"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.0"
},
{
"fixed": "6.12.10"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-57940.json"
}
}
],
"modified": "2026-10-28T02:30:48.767744850Z",
"provider": "osv",
"references": [
"https://cert-portal.siemens.com/productcert/html/ssa-265688.html",
"https://cert-portal.siemens.com/productcert/html/ssa-503939.html",
"https://git.kernel.org/stable/c/28c21f0ac5293a4bf19b3e0e32005d6dd31a6c17",
"https://git.kernel.org/stable/c/31beabd0f47f8c3ed9965ba861c9e5b252d4920a",
"https://git.kernel.org/stable/c/d8cfbb8723bd3d3222f360227a1cc15227189ca6",
"https://git.kernel.org/stable/c/d9ea94f5cd117d56e573696d0045ab3044185a15",
"https://git.kernel.org/stable/c/dc1d7afceb982e8f666e70a582e6b5aa806de063",
"https://git.kernel.org/stable/c/fee873761bd978d077d8c55334b4966ac4cb7b59",
"https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html",
"https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/57xxx/CVE-2024-57940.json",
"https://nvd.nist.gov/vuln/detail/CVE-2024-57940",
"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/2024/57xxx/CVE-2024-57940.json"
}
},
"related_cves": [
{
"value": "CVE-2024-57940",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 516825,
"published_at": "2025-01-21T12:18:09.15+00:00"
}