CVE-2024-38580 epoll: be better about file lifetimes
A use-after-free vulnerability in the Linux kernel's epoll subsystem allows attackers to potentially execute arbitrary code or escalate privileges.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-38580?
CVE-2024-38580 is a high-severity use after free vulnerability in Linux kernel, published on 19 Jun 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
epoll: be better about file lifetimes
epoll can call out to vfs_poll() with a file pointer that may race with the last 'fput()'. That would make f_count 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 f_count 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 vfs_poll() from the epoll routines.
Which versions are affected by CVE-2024-38580?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-38580?
Apply the vendor's patch.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2024-38580 being exploited?
There is no known exploitation of CVE-2024-38580 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2024-38580, DEBIAN-CVE-2024-38580, GHSA-hxvp-53j6-m4qh, ROOT-OS-DEBIAN-11-CVE-2024-38580, UBUNTU-CVE-2024-38580.