CVE-2024-57940

exfat: fix the infinite loop in exfat_readdir()

MEDIUM
5.5
CVSS Score
Published: January 21, 2025 at 12:18 PM UTC
Updated: October 15, 2026 at 02:17 AM UTC
2 products affected across 2 vendorsLinux KernelSIMATIC S7-1500 TM MFP

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

5.7 ≤ v < 6.1.1256.2 ≤ v < 6.6.726.7 ≤ v < 6.12.106.136.13 rc16.13 rc26.13 rc36.13 rc46.13 rc56.13 rc6ca06197382bde0a3bc20215595d1c9ce20c6e341
Vendor states this is fixed in 28c21f0ac5293a4bf19b3e0e32005d6dd31a6c17 (fixed)
Vendor states this is fixed in 31beabd0f47f8c3ed9965ba861c9e5b252d4920a (fixed)
Vendor states this is fixed in d8cfbb8723bd3d3222f360227a1cc15227189ca6 (fixed)
Vendor states this is fixed in d9ea94f5cd117d56e573696d0045ab3044185a15 (fixed)
Vendor states this is fixed in dc1d7afceb982e8f666e70a582e6b5aa806de063 (fixed)
Vendor states this is fixed in fee873761bd978d077d8c55334b4966ac4cb7b59 (fixed)
Vendor states this is fixed in 5.10.234 (unaffected)
Vendor states this is fixed in 5.15.177 (unaffected)
Vendor states this is fixed in 5.7 (unaffected)
Vendor states this is fixed in 6.1.125 (unaffected)
Vendor states this is fixed in 6.12.10 (unaffected)
Vendor states this is fixed in 6.13 (unaffected)
Vendor states this is fixed in 6.6.72 (unaffected)

References (10)

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-835

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card