# CVE-2024-35872: mm/secretmem: fix GUP-fast succeeding on secretmem folios

- Priority: **Routine**
- Reason: Not severe (CVSS 7.8, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2024-05-19 · Modified: 2026-08-05
- Aliases: UBUNTU-CVE-2024-35872, DEBIAN-CVE-2024-35872
- Record: https://cvemate.com/vulnerability/CVE-2024-35872 · JSON: https://cvemate.com/vulnerability/CVE-2024-35872/json

## Description

```text
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.
```

## Signals

- CVSS: 7.8 high (v3.1, CVE.org) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.236%, percentile 15.587%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 114)

- debian linux (Debian): \< 6.1.85-1 \| \< 6.8.9-1
- ubuntu linux (Ubuntu): \< 5.15.0-116.126 \| \< 6.8.0-38.38
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): \< 5.15.0-1065.71 \| \< 6.8.0-1011.12
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): \< 5.15.0-1065.71~20.04.1
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): \< 6.8.0-1011.12~22.04.1
- ubuntu linux-aws-fips (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-1065.71+fips1
- ubuntu linux-azure (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-1068.77 \| \< 6.8.0-1010.10
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.15 (Ubuntu): \< 5.15.0-1068.77~20.04.1
- ubuntu linux-azure-5.19 (Ubuntu): All versions (No fix recorded)

## References (first 20 of 21)

- <https://git.kernel.org/stable/c/6564b014af92b677c1f07c44d7f5b595d589cf6e>
- <https://git.kernel.org/stable/c/9c2b4b657739ecda38e3b383354a29566955ac48>
- <https://git.kernel.org/stable/c/43fad1d0284de30159661d0badfc3cbaf7e6f8f8>
- <https://git.kernel.org/stable/c/201e4aaf405dfd1308da54448654053004c579b5>
- <https://git.kernel.org/stable/c/65291dcfcf8936e1b23cfd7718fdfde7cfaf7706>
- <https://ubuntu.com/security/CVE-2024-35872>
- <https://www.cve.org/CVERecord?id=CVE-2024-35872>
- <https://git.kernel.org/linus/65291dcfcf8936e1b23cfd7718fdfde7cfaf7706>
- <https://ubuntu.com/security/notices/USN-6893-1>
- <https://ubuntu.com/security/notices/USN-6898-1>
- <https://ubuntu.com/security/notices/USN-6893-2>
- <https://ubuntu.com/security/notices/USN-6898-2>
- <https://ubuntu.com/security/notices/USN-6898-3>
- <https://ubuntu.com/security/notices/USN-6893-3>
- <https://ubuntu.com/security/notices/USN-6898-4>
- <https://ubuntu.com/security/notices/USN-6917-1>
- <https://ubuntu.com/security/notices/USN-6919-1>
- <https://ubuntu.com/security/notices/USN-6918-1>
- <https://ubuntu.com/security/notices/USN-6927-1>
- <https://ubuntu.com/security/notices/USN-7019-1>

---

Data as of 2026-12-05T03:51:52.483Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
