Skip to main content

CVE-2024-38570: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-38570cvecve-2024-38570
Published: Wed Jun 19 2024 (06/19/2024, 13:35:36 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

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.

AI-Powered Analysis

AILast updated: 06/29/2025, 11:27:01 UTC

Technical Analysis

CVE-2024-38570 is a vulnerability identified in the Linux kernel's GFS2 (Global File System 2) component, specifically related to the Distributed Lock Manager (DLM) lockspace release and glock (GFS2 lock) management during filesystem unmount operations. The issue arises when a DLM lockspace is released while there are still active locks within that lockspace. The DLM automatically unlocks these locks upon release. A prior commit (fb6791d100d1bba20b5cdbc4912e1f7086ec60f8) attempted to optimize filesystem unmount speed by freeing glocks that were not intended to be unlocked before releasing the lockspace. However, this approach neglected the asynchronous lock contention notification callbacks (AST and BAST), which remain active until a lock is explicitly unlocked or its lockspace is released. These callbacks could access glocks that had already been freed, leading to a use-after-free condition. This vulnerability could cause kernel crashes or undefined behavior, potentially leading to denial of service or privilege escalation if exploited. The fix involves placing glocks that should not be unlocked on a dedicated 'sd_dead_glocks' list, releasing the lockspace first, and only then freeing those glocks. Additionally, the patch ignores unexpected AST and BAST callbacks if the receiving glock is marked as dead, preventing access to deallocated memory. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet.

Potential Impact

For European organizations, this vulnerability poses a risk primarily to systems running Linux kernels with GFS2 filesystems, which are often used in clustered or high-availability environments such as data centers, cloud infrastructure, and enterprise storage solutions. Exploitation could lead to kernel crashes causing denial of service, impacting availability of critical services. In worst-case scenarios, if an attacker can trigger this vulnerability remotely or via local access, it might be leveraged to escalate privileges or execute arbitrary code within the kernel context, compromising confidentiality and integrity of data. Given the widespread use of Linux in European enterprises, cloud providers, and public sector infrastructure, unpatched systems could face operational disruptions and potential data breaches. The asynchronous nature of the vulnerability means that even indirect or delayed callbacks could trigger instability, complicating detection and mitigation. However, the absence of known exploits and the technical complexity of triggering this use-after-free condition somewhat limits immediate risk but does not eliminate it.

Mitigation Recommendations

European organizations should prioritize updating their Linux kernel to versions that include the patch for CVE-2024-38570 as soon as it becomes available. Until patched, administrators should audit systems using GFS2 filesystems and DLM lockspaces, especially in clustered environments, to identify potential exposure. Avoid unmounting filesystems under heavy lock contention or during critical operations to reduce the chance of triggering the vulnerability. Implement kernel crash monitoring and logging to detect anomalies related to glock use-after-free conditions. For environments where patching is delayed, consider isolating affected systems or restricting access to trusted users to minimize exploitation risk. Additionally, review and harden access controls and monitoring around systems running GFS2 to detect suspicious activity that might attempt to exploit this vulnerability. Coordination with Linux distribution vendors for timely patch deployment and validation is critical.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-06-18T19:36:34.923Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9829c4522896dcbe29db

Added to database: 5/21/2025, 9:08:57 AM

Last enriched: 6/29/2025, 11:27:01 AM

Last updated: 7/27/2025, 3:07:13 AM

Views: 13

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats