CVE-2024-57892
Published: 15 January 2025
Summary
CVE-2024-57892 is a high-severity Use After Free (CWE-416) vulnerability in Linux Linux Kernel. Its CVSS base score is 7.8 (High).
Operationally, exploitation aligns with the MITRE ATT&CK technique Exploitation for Privilege Escalation (T1068); ranked at the 5.3th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.
The strongest mitigations our analysis identified are NIST 800-53 SI-2 (Flaw Remediation) and CM-6 (Configuration Settings).
Threat & Defense at a Glance
Threat & Defense Details
Mitigating Controls (NIST 800-53 r5)AI
SI-2 requires timely remediation of identified flaws, directly addressing the use-after-free vulnerability by applying upstream kernel patches that null the dangling dqi_priv pointer and add DQUOT_SUSPENDED checks.
SI-16 implements memory protection mechanisms such as kernel ASLR, SMAP, and non-executable memory that mitigate exploitation of the ocfs2 dangling pointer use-after-free.
CM-6 enforces secure configuration settings like blacklisting the ocfs2 module or disabling quota features if not required, preventing exposure to the remount-triggered vulnerability.
MITRE ATT&CK Enterprise TechniquesAI
Why these techniques?
Local kernel UAF in ocfs2 directly enables privilege escalation via arbitrary code execution from low-privileged context.
NVD Description
In the Linux kernel, the following vulnerability has been resolved: ocfs2: fix slab-use-after-free due to dangling pointer dqi_priv When mounting ocfs2 and then remounting it as read-only, a slab-use-after-free occurs after the user uses a syscall to quota_getnextquota. Specifically, sb_dqinfo(sb,…
more
type)->dqi_priv is the dangling pointer. During the remounting process, the pointer dqi_priv is freed but is never set as null leaving it to be accessed. Additionally, the read-only option for remounting sets the DQUOT_SUSPENDED flag instead of setting the DQUOT_USAGE_ENABLED flags. Moreover, later in the process of getting the next quota, the function ocfs2_get_next_id is called and only checks the quota usage flags and not the quota suspended flags. To fix this, I set dqi_priv to null when it is freed after remounting with read-only and put a check for DQUOT_SUSPENDED in ocfs2_get_next_id. [akpm@linux-foundation.org: coding-style cleanups]
Deeper analysisAI
CVE-2024-57892 is a slab-use-after-free vulnerability in the Linux kernel's ocfs2 filesystem, caused by a dangling pointer in sb_dqinfo(sb, type)->dqi_priv. The issue arises when an ocfs2 filesystem is mounted, remounted as read-only, and then a user calls the quota_getnextquota syscall. During remounting, dqi_priv is freed but not set to NULL, allowing subsequent access. Additionally, read-only remount sets the DQUOT_SUSPENDED flag rather than DQUOT_USAGE_ENABLED, and the ocfs2_get_next_id function checks only usage flags, ignoring the suspended state.
A local attacker with low privileges (PR:L) can exploit this vulnerability with low complexity (AC:L) and no user interaction (UI:N), as indicated by its CVSS v3.1 score of 7.8 (AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H). By mounting an ocfs2 filesystem, remounting it read-only, and invoking quota_getnextquota, the attacker triggers the use-after-free, potentially leading to high confidentiality, integrity, and availability impacts, such as arbitrary code execution or system crashes via the dangling pointer dereference.
Mitigation is provided through upstream kernel patches, available in multiple stable releases via the referenced commits. These fixes explicitly set dqi_priv to NULL after freeing it during read-only remount and add a DQUOT_SUSPENDED flag check in ocfs2_get_next_id to prevent invalid access. Security practitioners should update affected Linux kernels to incorporate these patches.
Details
- CWE(s)