Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2024-38570 Overview
CVE-2024-38570 is a use-after-free vulnerability [CWE-416] in the Global File System 2 (GFS2) component of the Linux kernel. The flaw occurs during filesystem unmount when the Distributed Lock Manager (DLM) lockspace is released while glock objects remain active. Asynchronous bast (blocking ast) callbacks from DLM can access deallocated glock memory after the kernel frees those objects. A local, authenticated attacker with the ability to mount and unmount GFS2 filesystems can trigger the condition.
Critical Impact
Local exploitation can lead to kernel memory corruption, potential privilege escalation, and system crashes on hosts using GFS2 clustered filesystems.
Affected Products
- Linux Kernel (GFS2 filesystem subsystem)
- Distributions shipping vulnerable kernels prior to the fix commits
- Clustered storage deployments relying on DLM and GFS2
Discovery Timeline
- 2024-06-19 - CVE-2024-38570 published to NVD
- 2026-08-04 - Last updated in NVD database
Technical Details for CVE-2024-38570
Vulnerability Analysis
The vulnerability resides in the GFS2 filesystem unmount path. When a DLM lockspace is released with locks still held, DLM automatically unlocks those locks. Commit fb6791d100d1b leveraged this behavior to accelerate unmount by freeing glocks directly rather than unlocking them individually.
This optimization overlooked the lifecycle of asynchronous ast and bast callbacks. These callbacks remain active until a lock is explicitly unlocked or its lockspace is released. The race window allows DLM to invoke a bast callback against a glock structure that GFS2 has already freed. The result is kernel-mode access to deallocated memory, consistent with CWE-416.
Root Cause
The root cause is incorrect object lifetime management between GFS2 and DLM. GFS2 freed glock structures before guaranteeing that no pending DLM callbacks could reference them. The fix moves affected glocks onto an sd_dead_glocks list, releases the lockspace to terminate callback activity, and only then frees the glocks. The patch also adds a defensive check to ignore unexpected ast and bast callbacks when the receiving glock is already marked dead.
Attack Vector
Exploitation requires local access with privileges sufficient to mount or unmount GFS2 filesystems. An attacker triggers unmount while contention on cluster-wide locks causes DLM to issue blocking ast notifications. Successful corruption of kernel heap memory can escalate to arbitrary kernel code execution or denial of service. The scope is limited to systems that actively use GFS2 in clustered configurations.
No public proof-of-concept exploit is available, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. See the upstream fixes in Kernel Commit 0636b34 and Kernel Commit e42e8a24 for the implementation details.
Detection Methods for CVE-2024-38570
Indicators of Compromise
- Unexpected kernel oops or panic messages referencing gfs2_glock, dlm_astd, or bast callbacks during or after unmount operations.
- KASAN use-after-free reports targeting GFS2 glock allocations on kernels with debugging enabled.
- Repeated GFS2 unmount cycles originating from unprivileged or anomalous user sessions.
Detection Strategies
- Compare running kernel versions against the fixed commits (0636b34b, 501cd8fa, d98779e6, e42e8a24) and flag unpatched hosts running GFS2.
- Monitor dmesg and /var/log/messages for GFS2 or DLM stack traces that correlate with filesystem teardown events.
- Enable kernel memory sanitizers in test environments to surface races before production exposure.
Monitoring Recommendations
- Collect kernel ring buffer telemetry from clustered storage nodes and forward it to a centralized logging pipeline for anomaly correlation.
- Alert on repeated mount/umount syscalls targeting gfs2 filesystem types from non-administrative accounts.
- Track cluster membership transitions in Corosync or Pacemaker that coincide with kernel instability.
How to Mitigate CVE-2024-38570
Immediate Actions Required
- Apply the stable kernel updates containing the GFS2 glock lifecycle fix on all nodes participating in GFS2 clusters.
- Restrict mount and unmount privileges on GFS2 filesystems to trusted administrative accounts only.
- Audit cluster nodes for unauthorized local shell access that could be used to trigger the race.
Patch Information
The fix is distributed across four upstream commits in the Linux stable tree: Kernel Commit 0636b34, Kernel Commit 501cd8fa, Kernel Commit d98779e6, and Kernel Commit e42e8a24. Consult your distribution vendor advisories for backported package versions.
Workarounds
- Where feasible, migrate workloads off GFS2 to alternative clustered filesystems until the kernel is patched.
- Disable the gfs2 kernel module on hosts that do not require clustered filesystem functionality using modprobe -r gfs2 and blacklisting.
- Enforce strict access controls on CAP_SYS_ADMIN and container capabilities that permit mount operations.
# Verify kernel version and GFS2 module status
uname -r
lsmod | grep gfs2
# Blacklist the gfs2 module on hosts that do not require it
echo 'blacklist gfs2' | sudo tee /etc/modprobe.d/blacklist-gfs2.conf
sudo update-initramfs -u
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

