{"id":"CVE-2024-57940","state":"PUBLISHED","title":"exfat: fix the infinite loop in exfat_readdir()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nexfat: fix the infinite loop in exfat_readdir()\n\nIf the file system is corrupted so that a cluster is linked to\nitself in the cluster chain, and there is an unused directory\nentry in the cluster, 'dentry' will not be incremented, causing\ncondition 'dentry < max_dentries' unable to prevent an infinite\nloop.\n\nThis infinite loop causes s_lock not to be released, and other\ntasks will hang, such as exfat_sync_fs().\n\nThis commit stops traversing the cluster chain when there is unused\ndirectory entry in the cluster to avoid this infinite loop.","publishedAt":"2025-01-21T12:18:09.150Z","updatedAt":"2026-10-15T01:00:52.079Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"ca06197382bde0a3bc20215595d1c9ce20c6e341","status":"affected","lessThan":"d8cfbb8723bd3d3222f360227a1cc15227189ca6","versionType":"git"},{"version":"ca06197382bde0a3bc20215595d1c9ce20c6e341","status":"affected","lessThan":"28c21f0ac5293a4bf19b3e0e32005d6dd31a6c17","versionType":"git"},{"version":"ca06197382bde0a3bc20215595d1c9ce20c6e341","status":"affected","lessThan":"31beabd0f47f8c3ed9965ba861c9e5b252d4920a","versionType":"git"},{"version":"ca06197382bde0a3bc20215595d1c9ce20c6e341","status":"affected","lessThan":"dc1d7afceb982e8f666e70a582e6b5aa806de063","versionType":"git"},{"version":"ca06197382bde0a3bc20215595d1c9ce20c6e341","status":"affected","lessThan":"d9ea94f5cd117d56e573696d0045ab3044185a15","versionType":"git"},{"version":"ca06197382bde0a3bc20215595d1c9ce20c6e341","status":"affected","lessThan":"fee873761bd978d077d8c55334b4966ac4cb7b59","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/exfat/dir.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.7","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.7","versionType":"semver"},{"version":"5.10.234","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.177","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.125","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.72","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.10","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/exfat/dir.c"]}],"references":["https://git.kernel.org/stable/c/d8cfbb8723bd3d3222f360227a1cc15227189ca6","https://git.kernel.org/stable/c/28c21f0ac5293a4bf19b3e0e32005d6dd31a6c17","https://git.kernel.org/stable/c/31beabd0f47f8c3ed9965ba861c9e5b252d4920a","https://git.kernel.org/stable/c/dc1d7afceb982e8f666e70a582e6b5aa806de063","https://git.kernel.org/stable/c/d9ea94f5cd117d56e573696d0045ab3044185a15","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://cert-portal.siemens.com/productcert/html/ssa-265688.html","https://cert-portal.siemens.com/productcert/html/ssa-503939.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:08:12.933Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/57xxx/CVE-2024-57940.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-57940","state":"PUBLISHED","datePublished":"2025-01-21T12:18:09.150Z","dateUpdated":"2026-10-15T01:00:52.079Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-01-19T11:50:08.378Z"},"containers":{"cna":{"title":"exfat: fix the infinite loop in exfat_readdir()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nexfat: fix the infinite loop in exfat_readdir()\n\nIf the file system is corrupted so that a cluster is linked to\nitself in the cluster chain, and there is an unused directory\nentry in the cluster, 'dentry' will not be incremented, causing\ncondition 'dentry < max_dentries' unable to prevent an infinite\nloop.\n\nThis infinite loop causes s_lock not to be released, and other\ntasks will hang, such as exfat_sync_fs().\n\nThis commit stops traversing the cluster chain when there is unused\ndirectory entry in the cluster to avoid this infinite loop."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"ca06197382bde0a3bc20215595d1c9ce20c6e341","status":"affected","lessThan":"d8cfbb8723bd3d3222f360227a1cc15227189ca6","versionType":"git"},{"version":"ca06197382bde0a3bc20215595d1c9ce20c6e341","status":"affected","lessThan":"28c21f0ac5293a4bf19b3e0e32005d6dd31a6c17","versionType":"git"},{"version":"ca06197382bde0a3bc20215595d1c9ce20c6e341","status":"affected","lessThan":"31beabd0f47f8c3ed9965ba861c9e5b252d4920a","versionType":"git"},{"version":"ca06197382bde0a3bc20215595d1c9ce20c6e341","status":"affected","lessThan":"dc1d7afceb982e8f666e70a582e6b5aa806de063","versionType":"git"},{"version":"ca06197382bde0a3bc20215595d1c9ce20c6e341","status":"affected","lessThan":"d9ea94f5cd117d56e573696d0045ab3044185a15","versionType":"git"},{"version":"ca06197382bde0a3bc20215595d1c9ce20c6e341","status":"affected","lessThan":"fee873761bd978d077d8c55334b4966ac4cb7b59","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/exfat/dir.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.7","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.7","versionType":"semver"},{"version":"5.10.234","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.177","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.125","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.72","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.10","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/exfat/dir.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/d8cfbb8723bd3d3222f360227a1cc15227189ca6"},{"url":"https://git.kernel.org/stable/c/28c21f0ac5293a4bf19b3e0e32005d6dd31a6c17"},{"url":"https://git.kernel.org/stable/c/31beabd0f47f8c3ed9965ba861c9e5b252d4920a"},{"url":"https://git.kernel.org/stable/c/dc1d7afceb982e8f666e70a582e6b5aa806de063"},{"url":"https://git.kernel.org/stable/c/d9ea94f5cd117d56e573696d0045ab3044185a15"},{"url":"https://git.kernel.org/stable/c/fee873761bd978d077d8c55334b4966ac4cb7b59"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T21:01:04.019Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.7","versionEndExcluding":"5.10.234"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.7","versionEndExcluding":"5.15.177"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.7","versionEndExcluding":"6.1.125"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.7","versionEndExcluding":"6.6.72"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.7","versionEndExcluding":"6.12.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.7","versionEndExcluding":"6.13"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html"},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T20:56:09.764Z"}},{"affected":[{"vendor":"Siemens","product":"SIMATIC S7-1500 TM MFP - BIOS","defaultStatus":"unknown","versions":[{"version":"0","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 TM MFP - GNU/Linux subsystem","defaultStatus":"unknown","versions":[{"version":"0","status":"affected","lessThan":"V1.1.1","versionType":"custom"}]}],"references":[{"url":"https://cert-portal.siemens.com/productcert/html/ssa-265688.html"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-503939.html"}],"providerMetadata":{"shortName":"siemens-SADP","orgId":"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e","dateUpdated":"2026-10-15T01:00:52.079Z"},"x_adpType":"supplier"}]}}}