Skip to main content

CVE-2024-36028: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-36028cvecve-2024-36028
Published: Thu May 30 2024 (05/30/2024, 15:19:42 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: mm/hugetlb: fix DEBUG_LOCKS_WARN_ON(1) when dissolve_free_hugetlb_folio() When I did memory failure tests recently, below warning occurs: DEBUG_LOCKS_WARN_ON(1) WARNING: CPU: 8 PID: 1011 at kernel/locking/lockdep.c:232 __lock_acquire+0xccb/0x1ca0 Modules linked in: mce_inject hwpoison_inject CPU: 8 PID: 1011 Comm: bash Kdump: loaded Not tainted 6.9.0-rc3-next-20240410-00012-gdb69f219f4be #3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 RIP: 0010:__lock_acquire+0xccb/0x1ca0 RSP: 0018:ffffa7a1c7fe3bd0 EFLAGS: 00000082 RAX: 0000000000000000 RBX: eb851eb853975fcf RCX: ffffa1ce5fc1c9c8 RDX: 00000000ffffffd8 RSI: 0000000000000027 RDI: ffffa1ce5fc1c9c0 RBP: ffffa1c6865d3280 R08: ffffffffb0f570a8 R09: 0000000000009ffb R10: 0000000000000286 R11: ffffffffb0f2ad50 R12: ffffa1c6865d3d10 R13: ffffa1c6865d3c70 R14: 0000000000000000 R15: 0000000000000004 FS: 00007ff9f32aa740(0000) GS:ffffa1ce5fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ff9f3134ba0 CR3: 00000008484e4000 CR4: 00000000000006f0 Call Trace: <TASK> lock_acquire+0xbe/0x2d0 _raw_spin_lock_irqsave+0x3a/0x60 hugepage_subpool_put_pages.part.0+0xe/0xc0 free_huge_folio+0x253/0x3f0 dissolve_free_huge_page+0x147/0x210 __page_handle_poison+0x9/0x70 memory_failure+0x4e6/0x8c0 hard_offline_page_store+0x55/0xa0 kernfs_fop_write_iter+0x12c/0x1d0 vfs_write+0x380/0x540 ksys_write+0x64/0xe0 do_syscall_64+0xbc/0x1d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff9f3114887 RSP: 002b:00007ffecbacb458 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000000000c RCX: 00007ff9f3114887 RDX: 000000000000000c RSI: 0000564494164e10 RDI: 0000000000000001 RBP: 0000564494164e10 R08: 00007ff9f31d1460 R09: 000000007fffffff R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000000c R13: 00007ff9f321b780 R14: 00007ff9f3217600 R15: 00007ff9f3216a00 </TASK> Kernel panic - not syncing: kernel: panic_on_warn set ... CPU: 8 PID: 1011 Comm: bash Kdump: loaded Not tainted 6.9.0-rc3-next-20240410-00012-gdb69f219f4be #3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: <TASK> panic+0x326/0x350 check_panic_on_warn+0x4f/0x50 __warn+0x98/0x190 report_bug+0x18e/0x1a0 handle_bug+0x3d/0x70 exc_invalid_op+0x18/0x70 asm_exc_invalid_op+0x1a/0x20 RIP: 0010:__lock_acquire+0xccb/0x1ca0 RSP: 0018:ffffa7a1c7fe3bd0 EFLAGS: 00000082 RAX: 0000000000000000 RBX: eb851eb853975fcf RCX: ffffa1ce5fc1c9c8 RDX: 00000000ffffffd8 RSI: 0000000000000027 RDI: ffffa1ce5fc1c9c0 RBP: ffffa1c6865d3280 R08: ffffffffb0f570a8 R09: 0000000000009ffb R10: 0000000000000286 R11: ffffffffb0f2ad50 R12: ffffa1c6865d3d10 R13: ffffa1c6865d3c70 R14: 0000000000000000 R15: 0000000000000004 lock_acquire+0xbe/0x2d0 _raw_spin_lock_irqsave+0x3a/0x60 hugepage_subpool_put_pages.part.0+0xe/0xc0 free_huge_folio+0x253/0x3f0 dissolve_free_huge_page+0x147/0x210 __page_handle_poison+0x9/0x70 memory_failure+0x4e6/0x8c0 hard_offline_page_store+0x55/0xa0 kernfs_fop_write_iter+0x12c/0x1d0 vfs_write+0x380/0x540 ksys_write+0x64/0xe0 do_syscall_64+0xbc/0x1d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff9f3114887 RSP: 002b:00007ffecbacb458 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000000000c RCX: 00007ff9f3114887 RDX: 000000000000000c RSI: 0000564494164e10 RDI: 0000000000000001 RBP: 0000564494164e10 R08: 00007ff9f31d1460 R09: 000000007fffffff R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000000c R13: 00007ff9f321b780 R14: 00007ff9f3217600 R15: 00007ff9f3216a00 </TASK> After git bisecting and digging into the code, I believe the root cause is that _deferred_list field of folio is unioned with _hugetlb_subpool field. In __update_and_free_hugetlb_folio(), folio->_deferred_ ---truncated---

AI-Powered Analysis

AILast updated: 06/28/2025, 03:39:45 UTC

Technical Analysis

CVE-2024-36028 is a vulnerability identified in the Linux kernel, specifically within the memory management subsystem handling huge pages (hugetlb). The issue arises from a concurrency and locking bug related to the handling of the _deferred_list and _hugetlb_subpool fields of the folio structure, which are unioned. The vulnerability manifests as a DEBUG_LOCKS_WARN_ON(1) warning triggered during memory failure tests, leading to kernel warnings and ultimately a kernel panic when panic_on_warn is set. The root cause is a race condition or improper lock acquisition in the function __lock_acquire during the freeing and dissolving of huge pages (dissolve_free_hugetlb_folio). This can cause the kernel to hit a panic state, resulting in a denial of service (DoS) due to system crash. The detailed kernel stack traces show the problem occurs during memory failure handling and huge page management, involving functions like hugepage_subpool_put_pages, free_huge_folio, and dissolve_free_huge_page. The vulnerability affects multiple Linux kernel versions as identified by specific commit hashes. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet. However, the vulnerability is significant because it can cause system instability and crashes on affected Linux systems, especially those using huge pages and memory failure injection/testing features.

Potential Impact

For European organizations, the impact of CVE-2024-36028 can be substantial, particularly for enterprises and service providers relying on Linux servers for critical infrastructure, cloud services, and virtualization environments. The vulnerability can lead to unexpected kernel panics and system downtime, affecting availability of services. Organizations running workloads that utilize huge pages for performance optimization, such as databases, high-performance computing, or virtualization platforms, are at higher risk. The denial of service caused by kernel panic could disrupt business operations, cause data loss if not properly managed, and increase operational costs due to system recovery efforts. Additionally, environments that perform memory failure testing or use hardware poison injection modules may be more exposed. Although no direct exploitation for privilege escalation or data corruption is indicated, the availability impact alone is critical for sectors like finance, healthcare, telecommunications, and government services prevalent in Europe.

Mitigation Recommendations

To mitigate CVE-2024-36028, European organizations should: 1) Apply the latest Linux kernel patches as soon as they become available from trusted sources or Linux distributions, focusing on kernels that include fixes for huge page management and memory failure handling. 2) Temporarily disable or avoid using memory failure injection/testing features and hardware poison injection modules (mce_inject, hwpoison_inject) until patches are applied, as these appear related to triggering the issue. 3) Monitor kernel logs for DEBUG_LOCKS_WARN_ON warnings or kernel panics related to huge page operations to detect early signs of exploitation or instability. 4) Implement robust system monitoring and automated recovery mechanisms to minimize downtime in case of kernel panics. 5) For critical systems, consider isolating workloads that heavily use huge pages or memory failure features to dedicated hosts to limit blast radius. 6) Engage with Linux distribution vendors and security mailing lists to track patch releases and advisories related to this vulnerability. 7) Conduct thorough testing of updated kernels in staging environments before production deployment to ensure stability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-05-17T13:50:33.159Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9821c4522896dcbddcf6

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

Last enriched: 6/28/2025, 3:39:45 AM

Last updated: 8/11/2025, 10:59:05 AM

Views: 9

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