Skip to main content

CVE-2024-35993: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2024-35993cvecve-2024-35993
Published: Mon May 20 2024 (05/20/2024, 09:47:57 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: mm: turn folio_test_hugetlb into a PageType The current folio_test_hugetlb() can be fooled by a concurrent folio split into returning true for a folio which has never belonged to hugetlbfs. This can't happen if the caller holds a refcount on it, but we have a few places (memory-failure, compaction, procfs) which do not and should not take a speculative reference. Since hugetlb pages do not use individual page mapcounts (they are always fully mapped and use the entire_mapcount field to record the number of mappings), the PageType field is available now that page_mapcount() ignores the value in this field. In compaction and with CONFIG_DEBUG_VM enabled, the current implementation can result in an oops, as reported by Luis. This happens since 9c5ccf2db04b ("mm: remove HUGETLB_PAGE_DTOR") effectively added some VM_BUG_ON() checks in the PageHuge() testing path. [willy@infradead.org: update vmcoreinfo]

AI-Powered Analysis

AILast updated: 06/29/2025, 09:10:23 UTC

Technical Analysis

CVE-2024-35993 is a vulnerability identified in the Linux kernel's memory management subsystem, specifically related to the handling of huge pages (hugetlb). The issue arises from the function folio_test_hugetlb(), which is used to determine if a memory folio belongs to the hugetlb filesystem. Due to a concurrency flaw, folio_test_hugetlb() can be misled by a concurrent folio split operation, causing it to incorrectly return true for folios that have never belonged to hugetlbfs. This incorrect behavior occurs in code paths that do not hold a reference count on the folio, such as memory-failure handling, memory compaction, and procfs interactions. Since hugetlb pages do not maintain individual page mapcounts but instead use a collective entire_mapcount field, the vulnerability stems from the fact that the PageType field was not properly utilized to distinguish hugetlb pages. The flaw can lead to kernel oops (crashes) especially when CONFIG_DEBUG_VM is enabled, due to VM_BUG_ON() checks introduced in recent kernel commits. The vulnerability was introduced after commit 9c5ccf2db04b8d7c3df363fdd4856c2b79ab2c6a and affects Linux kernel versions containing this commit. Although no known exploits are currently reported in the wild, the flaw could potentially be triggered by local processes interacting with memory management features, leading to system instability or denial of service. The patch involves converting folio_test_hugetlb() into a PageType check to prevent incorrect identification of folios and avoid race conditions during folio splits.

Potential Impact

For European organizations, the impact of CVE-2024-35993 primarily involves potential system instability or denial of service on Linux systems using affected kernel versions. Since Linux is widely deployed across servers, cloud infrastructure, and embedded devices in Europe, organizations relying on affected kernels could experience unexpected kernel crashes, leading to service interruptions. This could affect critical infrastructure, financial institutions, government agencies, and enterprises that depend on Linux for their operations. Although the vulnerability does not appear to allow privilege escalation or remote code execution directly, the resulting denial of service could disrupt business continuity and availability of services. Organizations with high availability requirements or those running memory-intensive workloads using huge pages are particularly at risk. Additionally, debugging and memory management tools that rely on procfs or memory compaction could trigger the issue more readily. The absence of known exploits reduces immediate risk, but the complexity of the bug and its presence in core kernel memory management warrants prompt attention to avoid potential exploitation or accidental triggering in production environments.

Mitigation Recommendations

European organizations should take the following specific mitigation steps: 1) Identify and inventory Linux systems running kernel versions containing the vulnerable commit (9c5ccf2db04b8d7c3df363fdd4856c2b79ab2c6a or later affected versions). 2) Apply the official Linux kernel patches that convert folio_test_hugetlb() into a PageType check as soon as they become available from trusted Linux distributions or upstream sources. 3) For systems where immediate patching is not feasible, consider disabling or limiting the use of huge pages or memory compaction features temporarily, if operationally acceptable, to reduce exposure. 4) Enable kernel debugging and monitoring tools to detect unusual kernel oops or crashes related to memory management, especially if CONFIG_DEBUG_VM is enabled. 5) Conduct thorough testing of kernel updates in staging environments to ensure stability before deployment. 6) Maintain robust backup and recovery procedures to minimize downtime in case of crashes. 7) Monitor vendor advisories and security bulletins for updates or exploit reports related to this vulnerability. These targeted actions go beyond generic advice by focusing on the specific kernel features and configurations implicated in the vulnerability.

Need more detailed analysis?Get Pro

Technical Details

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

Threat ID: 682d9828c4522896dcbe23e0

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

Last enriched: 6/29/2025, 9:10:23 AM

Last updated: 8/12/2025, 2:00:05 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