Skip to main content

CVE-2024-36892: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2024-36892cvecve-2024-36892
Published: Thu May 30 2024 (05/30/2024, 15:28:58 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: mm/slub: avoid zeroing outside-object freepointer for single free Commit 284f17ac13fe ("mm/slub: handle bulk and single object freeing separately") splits single and bulk object freeing in two functions slab_free() and slab_free_bulk() which leads slab_free() to call slab_free_hook() directly instead of slab_free_freelist_hook(). If `init_on_free` is set, slab_free_hook() zeroes the object. Afterward, if `slub_debug=F` and `CONFIG_SLAB_FREELIST_HARDENED` are set, the do_slab_free() slowpath executes freelist consistency checks and try to decode a zeroed freepointer which leads to a "Freepointer corrupt" detection in check_object(). During bulk free, slab_free_freelist_hook() isn't affected as it always sets it objects freepointer using set_freepointer() to maintain its reconstructed freelist after `init_on_free`. For single free, object's freepointer thus needs to be avoided when stored outside the object if `init_on_free` is set. The freepointer left as is, check_object() may later detect an invalid pointer value due to objects overflow. To reproduce, set `slub_debug=FU init_on_free=1 log_level=7` on the command line of a kernel build with `CONFIG_SLAB_FREELIST_HARDENED=y`. dmesg sample log: [ 10.708715] ============================================================================= [ 10.710323] BUG kmalloc-rnd-05-32 (Tainted: G B T ): Freepointer corrupt [ 10.712695] ----------------------------------------------------------------------------- [ 10.712695] [ 10.712695] Slab 0xffffd8bdc400d580 objects=32 used=4 fp=0xffff9d9a80356f80 flags=0x200000000000a00(workingset|slab|node=0|zone=2) [ 10.716698] Object 0xffff9d9a80356600 @offset=1536 fp=0x7ee4f480ce0ecd7c [ 10.716698] [ 10.716698] Bytes b4 ffff9d9a803565f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 10.720703] Object ffff9d9a80356600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 10.720703] Object ffff9d9a80356610: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 10.724696] Padding ffff9d9a8035666c: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [ 10.724696] Padding ffff9d9a8035667c: 00 00 00 00 .... [ 10.724696] FIX kmalloc-rnd-05-32: Object at 0xffff9d9a80356600 not freed

AI-Powered Analysis

AILast updated: 06/29/2025, 09:55:48 UTC

Technical Analysis

CVE-2024-36892 is a vulnerability in the Linux kernel's memory management subsystem, specifically within the SLUB allocator, which is responsible for efficient kernel memory allocation and deallocation. The issue arises from the way single object freeing is handled when the kernel is configured with both `slub_debug=F` and `CONFIG_SLAB_FREELIST_HARDENED=y` along with `init_on_free=1`. The vulnerability is rooted in the splitting of the free operation into two separate functions: `slab_free()` for single object frees and `slab_free_bulk()` for bulk frees. While bulk frees correctly maintain the freepointer (a pointer used to track free objects) by setting it explicitly, the single free path zeroes the object but does not properly update the freepointer stored outside the object. This leads to a scenario where the freelist consistency checks, performed in the slowpath of `do_slab_free()`, attempt to decode a zeroed freepointer, resulting in a "Freepointer corrupt" error detected by `check_object()`. This inconsistency can cause kernel warnings or errors, potentially leading to kernel instability or denial of service. The vulnerability does not appear to be exploitable for privilege escalation or arbitrary code execution directly, but it can cause kernel crashes or memory corruption under specific debug configurations. The issue was introduced by commit 284f17ac13fe, which separated bulk and single free handling, and is reproducible with specific kernel boot parameters enabling slab freelist hardening and initialization on free. The vulnerability affects Linux kernel versions containing the referenced commit and configurations enabling these debugging and hardening features.

Potential Impact

For European organizations, the impact of CVE-2024-36892 primarily concerns system stability and reliability rather than direct data breaches or privilege escalations. Systems running Linux kernels with the affected configurations—particularly those using hardened slab freelist checks and initialization on free—may experience kernel panics or crashes when freeing memory objects singly. This can lead to denial of service conditions, disrupting critical services, especially in environments relying on Linux for servers, embedded systems, or infrastructure components. Organizations in sectors such as finance, healthcare, telecommunications, and critical infrastructure, which often deploy hardened kernels for security, may be more susceptible to operational disruptions. Additionally, debugging and development environments that enable these kernel options for testing or security hardening may face increased instability. Although no known exploits are currently in the wild, the vulnerability could be triggered inadvertently or during stress testing, impacting system availability. The lack of direct exploitation for privilege escalation reduces the risk of data confidentiality or integrity compromise but does not eliminate the risk of service outages.

Mitigation Recommendations

Mitigation requires applying the official Linux kernel patches that correct the handling of freepointers during single object frees under the specified configurations. Organizations should: 1) Update Linux kernels to versions that include the fix for CVE-2024-36892 once available from their distribution vendors or the upstream Linux kernel. 2) Review kernel boot parameters and disable `init_on_free=1` unless explicitly required for debugging or security hardening, as this setting triggers the problematic code path. 3) Avoid enabling `slub_debug=F` and `CONFIG_SLAB_FREELIST_HARDENED=y` simultaneously in production environments unless necessary, or ensure patches are applied before enabling these options. 4) Conduct thorough testing of kernel updates in staging environments that replicate production configurations to detect any stability issues. 5) Monitor kernel logs for "Freepointer corrupt" messages as indicators of this issue. 6) For critical systems, consider fallback to alternative memory allocators or kernel configurations that do not trigger this vulnerability until patched. These steps go beyond generic advice by focusing on configuration management and proactive patching tailored to the specific kernel features involved.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-05-30T15:25:07.065Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9828c4522896dcbe25b3

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

Last enriched: 6/29/2025, 9:55:48 AM

Last updated: 8/15/2025, 6:15:30 AM

Views: 20

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