CVE-2024-38580: epoll: be better about file lifetimes
In the Linux kernel, the following vulnerability has been resolved:
epoll: be better about file lifetimes
epoll can call out to vfspoll() with a file pointer that may race with the last 'fput()'. That would make fcount go down to zero, and while the ep->mtx locking means that the resulting file pointer tear-down will be blocked until the poll returns, it means that fcount is already dead, and any use of it won't actually get a reference to the file any more: it's dead regardless.
Make sure we have a valid ref on the file pointer before we call down to vfspoll() from the epoll routines.
Other sources
In the Linux kernel, the following vulnerability has been resolved:
epoll: be better about file lifetimes
The Linux kernel CVE team has assigned CVE-2024-38580 to this issue.
Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024061948-CVE-2024-38580-d87f@gregkh/T
— Red Hat
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 5.15.161 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.1.93 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.6.33 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.8.12 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.9 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1Fixed in 6.12.27-1 - Upgrade
Upgrade
Linux kernelto a version that resolves this vulnerability.Patch CVE-2024-38580
Event History
Frequently Asked Questions
What is the severity of CVE-2024-38580?
CVE-2024-38580 has a high severity rating due to the potential for race conditions affecting file lifetimes in the Linux kernel.
Which Linux kernel versions are affected by CVE-2024-38580?
CVE-2024-38580 affects multiple Linux kernel versions including versions prior to 5.15.161, 6.1.93, 6.6.33, 6.8.12, and 6.9.
How do I fix CVE-2024-38580?
To fix CVE-2024-38580, update your system to a kernel version that is patched, such as 5.15.161 or later, 6.1.93 or later, or apply specific updates provided by your distribution.
What systems are impacted by CVE-2024-38580?
CVE-2024-38580 impacts systems running affected versions of the Linux kernel, commonly in Red Hat and Debian distributions.
Is there a workaround for CVE-2024-38580?
There are no known effective workarounds for CVE-2024-38580, so the recommended action is to upgrade to a patched kernel version.