CVE-2024-35872: mm/secretmem: fix GUP-fast succeeding on secretmem folios
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.
Security readout for executives and security teams
Plain-English summary
A flaw in Linux secret-memory handling can let a local, low-privileged process obtain access to protected memory pages through a fast pinning path. Later kernel access to those pages can crash the system. The supplied CVSS score is 7.8, reflecting potentially serious confidentiality, integrity, and availability impact, although the description specifically confirms a kernel crash.
Executive priority
Treat this as a high-priority local kernel issue, especially on shared or untrusted-workload systems. It is not described as remotely exploitable, but successful triggering could cause a kernel crash and the CVSS assessment indicates broader potential impact. Use normal emergency kernel-patching controls and verify reboot completion.
Technical view
folio_is_secretmem() incorrectly depended on the transient LRU flag. A secretmem folio awaiting per-CPU batch drainage, or temporarily removed from LRU, could be misclassified. GUP-fast could then pin it. Because secretmem folios are removed from the direct map, later reads or writes could crash the kernel. The fix removes the unreliable LRU check.
Likely exposure
Exposure requires an affected Linux kernel and local, low-privileged access. Risk is greatest on systems allowing untrusted local workloads to reach the affected secretmem and GUP-fast behavior. The supplied version metadata identifies 5.14, 5.15.154, 6.1.85, 6.6.26, 6.8.5, and 6.9, but also contains ambiguous entries; verify vendor package status.
Exploitation context
The CVSS vector indicates local access, low complexity, low privileges, and no user interaction. The supplied sources do not establish active exploitation or a public exploit, and the CVE is not listed as KEV in the bundle. Absence from KEV does not prove exploitation has never occurred.
Researcher notes
The vulnerability is a classification race or state-reliability flaw rather than a stated secretmem design failure. The confirmed path involves missing the secretmem identity when LRU is unset, allowing GUP-fast success. The description confirms subsequent direct-map access can crash the kernel; it does not explain how the CVSS confidentiality and integrity impacts were demonstrated.
Mitigation direction
Update to a vendor-supported kernel containing the applicable upstream stable fix.
Consult the Linux distribution or appliance vendor for exact fixed package versions.
Prioritize multi-user systems and hosts permitting untrusted local workloads.
Restrict unnecessary local access while patching is pending.
Reboot into the updated kernel after installation.
Validation and detection
Record the currently running kernel version, not only installed package versions.
Map the vendor kernel package to its advisory or applicable stable fix commit.
Confirm the host rebooted into the corrected kernel.
Review kernel crash records for incidents involving secretmem or GUP-fast.
Re-scan affected assets after deployment and resolve version-detection ambiguity.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2024-35872 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.