CVE-2024-57892·Kernel vulnerability
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, 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]
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.12.9
- Published
- 2025-01-15
Affected versions
From: 6.7
Until: 6.12.9
Fixed in: 6.12.9
How to fix this CVE
Update your Linux kernel to version 6.12.9 or later to resolve a memory safety issue in the OCFS2 filesystem quota handling. This vulnerability occurs when remounting OCFS2 volumes as read-only, causing a dangling pointer to be accessed during subsequent quota operations. Apply the kernel update through your distribution's package manager and reboot your system to complete the remediation.
sudo dnf update kernel && sudo rebootDefensia detects this vulnerability
How to check if you are affected
- Check your current kernel version with: uname -r
- Identify if OCFS2 is mounted on your system: mount | grep ocfs2
- Review kernel logs for use-after-free errors related to quota: sudo dmesg | grep -i 'slab-use-after-free\|dqi_priv'
- After patching, verify the kernel version has been updated to 6.12.9 or later: uname -r
FAQ
What is CVE-2024-57892?
This is a use-after-free vulnerability in the OCFS2 filesystem driver that occurs when a volume is remounted as read-only. The quota private data pointer is freed but not nullified, leading to memory corruption when quota operations are performed afterward.
Is CVE-2024-57892 being actively exploited?
No, CVE-2024-57892 is not listed on the CISA Known Exploited Vulnerabilities catalog and no public exploits are currently available. However, it should still be patched promptly due to its high severity rating.
What versions of Kernel are affected by CVE-2024-57892?
Linux kernel versions 6.7 through 6.12.8 are vulnerable. The fix is included in kernel 6.12.9 and all subsequent versions.
How do I check if my server is vulnerable to CVE-2024-57892?
Run 'uname -r' to check your kernel version. If it reports a version between 6.7 and 6.12.8 and OCFS2 is in use, your system is vulnerable.
Does Defensia detect CVE-2024-57892?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2024-57892 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/2d431192486367eee03cc28d0b53b97dafcb8e63
- https://git.kernel.org/stable/c/2e3d203b1adede46bbba049e497765d67865be18
- https://git.kernel.org/stable/c/58f9e20e2a7602e1dd649a1ec4790077c251cb6c
- https://git.kernel.org/stable/c/5f3fd772d152229d94602bca243fbb658068a597
- https://git.kernel.org/stable/c/8ff6f635a08c30559ded0c110c7ce03ba7747d11
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-57892. Free for 1 server.
Get started free