CVE-2024-35872: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: mm/secretmem: fix GUP-fast succeeding on secretmem folios folio_is_secretmem() currently relies on secretmem folios being LRU folios, to save some cycles. However, folios might reside in a folio batch without the LRU flag set, or temporarily have their LRU flag cleared. Consequently, the LRU flag is unreliable for this purpose. In particular, this is the case when secretmem_fault() allocates a fresh page and calls filemap_add_folio()->folio_add_lru(). The folio might be added to the per-cpu folio batch and won't get the LRU flag set until the batch was drained using e.g., lru_add_drain(). Consequently, folio_is_secretmem() might not detect secretmem folios and GUP-fast can succeed in grabbing a secretmem folio, crashing the kernel when we would later try reading/writing to the folio, because the folio has been unmapped from the directmap. Fix it by removing that unreliable check.
AI Analysis
Technical Summary
CVE-2024-35872 is a vulnerability in the Linux kernel related to the handling of secret memory folios within the memory management subsystem. Specifically, the issue arises in the function folio_is_secretmem(), which is designed to identify secret memory folios by checking if they are part of the Least Recently Used (LRU) list. The vulnerability stems from the fact that secret memory folios may temporarily lack the LRU flag due to their management in per-CPU folio batches, where folios can be added without immediately setting the LRU flag until the batch is drained. This unreliable reliance on the LRU flag causes folio_is_secretmem() to fail to detect secret memory folios correctly. As a result, the GUP-fast (Get User Pages fast) mechanism can mistakenly succeed in grabbing a secret memory folio that should not be accessible. Subsequent attempts to read or write to this folio lead to kernel crashes because the folio has been unmapped from the direct memory map (directmap). The fix involves removing the dependence on the LRU flag for identifying secret memory folios, thereby preventing GUP-fast from improperly accessing these folios and avoiding kernel crashes. This vulnerability affects Linux kernel versions identified by the commit hash 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49 and was published on May 19, 2024. No known exploits are reported in the wild at this time.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to systems running vulnerable Linux kernel versions, which are common in enterprise servers, cloud infrastructure, and embedded devices. The vulnerability can lead to kernel crashes, resulting in denial of service (DoS) conditions. Such crashes could disrupt critical services, cause downtime, and potentially lead to data loss or corruption if systems are not properly managed. While the vulnerability does not directly enable privilege escalation or remote code execution, the instability caused by kernel crashes can be exploited by attackers to degrade system availability or as part of a broader attack chain. Organizations relying on Linux-based infrastructure for critical operations, including financial institutions, telecommunications, and government services, could face operational disruptions. Additionally, the complexity of the vulnerability in memory management may complicate forensic analysis and recovery efforts after an incident. The absence of known exploits reduces immediate risk, but the potential for future exploitation remains, especially if attackers develop methods to trigger the kernel crash remotely or through crafted workloads.
Mitigation Recommendations
European organizations should prioritize updating their Linux kernel to the patched version that removes the unreliable LRU flag check in folio_is_secretmem(). This update is critical to prevent kernel crashes caused by improper handling of secret memory folios. System administrators should: 1) Identify all systems running affected Linux kernel versions, especially those using the commit hash 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49 or earlier; 2) Apply official kernel patches or upgrade to a fixed kernel release as soon as possible; 3) Monitor system logs for unusual kernel messages or crashes related to memory management; 4) Implement robust kernel crash recovery and system restart procedures to minimize downtime; 5) For environments where immediate patching is not feasible, consider isolating vulnerable systems or limiting access to reduce exposure; 6) Engage with Linux distribution vendors for backported patches if using long-term support kernels; and 7) Maintain up-to-date backups and conduct regular system integrity checks to facilitate recovery from potential crashes.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy, Spain, Poland, Belgium
CVE-2024-35872: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: mm/secretmem: fix GUP-fast succeeding on secretmem folios folio_is_secretmem() currently relies on secretmem folios being LRU folios, to save some cycles. However, folios might reside in a folio batch without the LRU flag set, or temporarily have their LRU flag cleared. Consequently, the LRU flag is unreliable for this purpose. In particular, this is the case when secretmem_fault() allocates a fresh page and calls filemap_add_folio()->folio_add_lru(). The folio might be added to the per-cpu folio batch and won't get the LRU flag set until the batch was drained using e.g., lru_add_drain(). Consequently, folio_is_secretmem() might not detect secretmem folios and GUP-fast can succeed in grabbing a secretmem folio, crashing the kernel when we would later try reading/writing to the folio, because the folio has been unmapped from the directmap. Fix it by removing that unreliable check.
AI-Powered Analysis
Technical Analysis
CVE-2024-35872 is a vulnerability in the Linux kernel related to the handling of secret memory folios within the memory management subsystem. Specifically, the issue arises in the function folio_is_secretmem(), which is designed to identify secret memory folios by checking if they are part of the Least Recently Used (LRU) list. The vulnerability stems from the fact that secret memory folios may temporarily lack the LRU flag due to their management in per-CPU folio batches, where folios can be added without immediately setting the LRU flag until the batch is drained. This unreliable reliance on the LRU flag causes folio_is_secretmem() to fail to detect secret memory folios correctly. As a result, the GUP-fast (Get User Pages fast) mechanism can mistakenly succeed in grabbing a secret memory folio that should not be accessible. Subsequent attempts to read or write to this folio lead to kernel crashes because the folio has been unmapped from the direct memory map (directmap). The fix involves removing the dependence on the LRU flag for identifying secret memory folios, thereby preventing GUP-fast from improperly accessing these folios and avoiding kernel crashes. This vulnerability affects Linux kernel versions identified by the commit hash 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49 and was published on May 19, 2024. No known exploits are reported in the wild at this time.
Potential Impact
For European organizations, this vulnerability poses a risk primarily to systems running vulnerable Linux kernel versions, which are common in enterprise servers, cloud infrastructure, and embedded devices. The vulnerability can lead to kernel crashes, resulting in denial of service (DoS) conditions. Such crashes could disrupt critical services, cause downtime, and potentially lead to data loss or corruption if systems are not properly managed. While the vulnerability does not directly enable privilege escalation or remote code execution, the instability caused by kernel crashes can be exploited by attackers to degrade system availability or as part of a broader attack chain. Organizations relying on Linux-based infrastructure for critical operations, including financial institutions, telecommunications, and government services, could face operational disruptions. Additionally, the complexity of the vulnerability in memory management may complicate forensic analysis and recovery efforts after an incident. The absence of known exploits reduces immediate risk, but the potential for future exploitation remains, especially if attackers develop methods to trigger the kernel crash remotely or through crafted workloads.
Mitigation Recommendations
European organizations should prioritize updating their Linux kernel to the patched version that removes the unreliable LRU flag check in folio_is_secretmem(). This update is critical to prevent kernel crashes caused by improper handling of secret memory folios. System administrators should: 1) Identify all systems running affected Linux kernel versions, especially those using the commit hash 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49 or earlier; 2) Apply official kernel patches or upgrade to a fixed kernel release as soon as possible; 3) Monitor system logs for unusual kernel messages or crashes related to memory management; 4) Implement robust kernel crash recovery and system restart procedures to minimize downtime; 5) For environments where immediate patching is not feasible, consider isolating vulnerable systems or limiting access to reduce exposure; 6) Engage with Linux distribution vendors for backported patches if using long-term support kernels; and 7) Maintain up-to-date backups and conduct regular system integrity checks to facilitate recovery from potential crashes.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-05-17T13:50:33.108Z
- Cisa Enriched
- true
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d982ac4522896dcbe3729
Added to database: 5/21/2025, 9:08:58 AM
Last enriched: 6/29/2025, 4:56:30 PM
Last updated: 12/3/2025, 3:16:35 AM
Views: 32
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-13646: CWE-434 Unrestricted Upload of File with Dangerous Type in wpchill Image Gallery – Photo Grid & Video Gallery
HighCVE-2025-13645: CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in wpchill Image Gallery – Photo Grid & Video Gallery
HighCVE-2025-13448: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in anastis CSSIgniter Shortcodes
MediumCVE-2025-55181: Excessive Iteration (CWE-834) in Facebook proxygen
MediumCVE-2025-64778: CWE-798 Use of Hard-coded Credentials in Mirion Medical EC2 Software NMIS BioDose
HighActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.