CVE-2024-38570 gfs2: Fix potential glock use-after-free on unmount
A use-after-free vulnerability in the Linux kernel's GFS2 filesystem allows attackers to cause denial of service or potentially execute code during unmount operations.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-38570?
CVE-2024-38570 is a critical use after free vulnerability in Linux kernel, published on 19 Jun 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
gfs2: Fix potential glock use-after-free on unmount
When a DLM lockspace is released and there ares still locks in that lockspace, DLM will unlock those locks automatically. Commit fb6791d100d1b started exploiting this behavior to speed up filesystem unmount: gfs2 would simply free glocks it didn't want to unlock and then release the lockspace. This didn't take the bast callbacks for asynchronous lock contention notifications into account, which remain active until until a lock is unlocked or its lockspace is released.
To prevent those callbacks from accessing deallocated objects, put the glocks that should not be unlocked on the sd_dead_glocks list, release the lockspace, and only then free those glocks.
As an additional measure, ignore unexpected ast and bast callbacks if the receiving glock is dead.
Weakness: CWE-416
Which versions are affected by CVE-2024-38570?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-38570?
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-38570 being exploited?
There is no known exploitation of CVE-2024-38570 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2024-38570, DEBIAN-CVE-2024-38570, GHSA-3wjv-2739-3h75, ROOT-OS-DEBIAN-11-CVE-2024-38570, ROOT-OS-DEBIAN-12-CVE-2024-38570, UBUNTU-CVE-2024-38570.