{"id":"CVE-2024-35872","published":"2024-05-19T08:34:30Z","modified":"2026-08-05T11:30:33Z","title":"mm/secretmem: fix GUP-fast succeeding on secretmem folios","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/secretmem: fix GUP-fast succeeding on secretmem folios\n\nfolio_is_secretmem() currently relies on secretmem folios being LRU\nfolios, to save some cycles.\n\nHowever, folios might reside in a folio batch without the LRU flag set, or\ntemporarily have their LRU flag cleared.  Consequently, the LRU flag is\nunreliable for this purpose.\n\nIn particular, this is the case when secretmem_fault() allocates a fresh\npage and calls filemap_add_folio()->folio_add_lru().  The folio might be\nadded to the per-cpu folio batch and won't get the LRU flag set until the\nbatch was drained using e.g., lru_add_drain().\n\nConsequently, folio_is_secretmem() might not detect secretmem folios and\nGUP-fast can succeed in grabbing a secretmem folio, crashing the kernel\nwhen we would later try reading/writing to the folio, because the folio\nhas been unmapped from the directmap.\n\nFix it by removing that unreliable check.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00236,"percentile":0.14884,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/6564b014af92b677c1f07c44d7f5b595d589cf6e","tags":[]},{"url":"https://git.kernel.org/stable/c/9c2b4b657739ecda38e3b383354a29566955ac48","tags":[]},{"url":"https://git.kernel.org/stable/c/43fad1d0284de30159661d0badfc3cbaf7e6f8f8","tags":[]},{"url":"https://git.kernel.org/stable/c/201e4aaf405dfd1308da54448654053004c579b5","tags":[]},{"url":"https://git.kernel.org/stable/c/65291dcfcf8936e1b23cfd7718fdfde7cfaf7706","tags":[]}],"priority":{"score":8.4,"factors":[{"name":"EPSS percentile","points":2.98},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49, < 6564b014af92b677c1f07c44d7f5b595d589cf6e",">= 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49, < 9c2b4b657739ecda38e3b383354a29566955ac48",">= 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49, < 43fad1d0284de30159661d0badfc3cbaf7e6f8f8",">= 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49, < 201e4aaf405dfd1308da54448654053004c579b5",">= 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49, < 65291dcfcf8936e1b23cfd7718fdfde7cfaf7706"]},{"vendor":"Linux","product":"Linux","versions":["5.14"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-05-20T15:13:36.224766Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2024-35590","exploited":false,"provenance":"source"}}