CVE-2024-57940

exfat: fix the infinite loop in exfat_readdir()

No CVSS score yet EPSS 0.22%

Published 21 Jan 2025 Updated 15 Oct 2026 CNA: Linux

Check your servers for CVE-2024-57940

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-57940 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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.

Exploitation

EPSS 0.22%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 14.0% of all scored CVEs. Scores of 1 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from ca06197382bde0a3bc20215595d1c9ce20c6e341, before d8cfbb8723bd3d3222f360227a1cc15227189ca6
affected from ca06197382bde0a3bc20215595d1c9ce20c6e341, before 28c21f0ac5293a4bf19b3e0e32005d6dd31a6c17
affected from ca06197382bde0a3bc20215595d1c9ce20c6e341, before 31beabd0f47f8c3ed9965ba861c9e5b252d4920a
affected from ca06197382bde0a3bc20215595d1c9ce20c6e341, before dc1d7afceb982e8f666e70a582e6b5aa806de063
affected from ca06197382bde0a3bc20215595d1c9ce20c6e341, before d9ea94f5cd117d56e573696d0045ab3044185a15
affected from ca06197382bde0a3bc20215595d1c9ce20c6e341, before fee873761bd978d077d8c55334b4966ac4cb7b59
Other versions: unaffected
Linux
affected 5.7
unaffected before 5.7
unaffected from 5.10.234 up to and including 5.10.*
unaffected from 5.15.177 up to and including 5.15.*
unaffected from 6.1.125 up to and including 6.1.*
unaffected from 6.6.72 up to and including 6.6.*
unaffected from 6.12.10 up to and including 6.12.*
unaffected 6.13 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2024-57940 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2024-57940

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2024-57940
trivy image --scanners vuln IMAGE | grep CVE-2024-57940

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2024-57940 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.