{"id":"CVE-2024-35872","aliases":["CVE-2024-35872"],"related":[],"kind":"vulnerability","state":"published","title":"mm/secretmem: fix GUP-fast succeeding on secretmem folios","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se resolvió la siguiente vulnerabilidad: mm/secretmem: corrige el éxito rápido de GUP en folios secretmem folio_is_secretmem() actualmente depende de que los folios secretmem sean folios LRU, para guardar algunos ciclos. Sin embargo, las publicaciones pueden residir en un lote de publicaciones sin el indicador LRU establecido o tener su indicador LRU borrado temporalmente. En consecuencia, la bandera LRU no es fiable para este fin. En particular, este es el caso cuando secretmem_fault() asigna una página nueva y llama a filemap_add_folio()-&gt;folio_add_lru(). La publicación podría agregarse al lote de publicaciones por CPU y no se establecerá el indicador LRU hasta que el lote se drene usando, por ejemplo, lru_add_drain(). En consecuencia, es posible que folio_is_secretmem() no detecte folios secretmem y GUP-fast puede lograr capturar un folio secretmem, bloqueando el kernel cuando más tarde intentemos leer/escribir en el folio, porque el folio no se ha desasignado del mapa directo. Solucionarlo eliminando ese cheque poco confiable.","source":"nvd"}],"published":"2024-05-19T08:34:30.096Z","modified":"2026-08-05T11:30:33.747Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"1507f51255c9ff07d75909a84e7c0d7f3c4b2f49","fixed":"6564b014af92b677c1f07c44d7f5b595d589cf6e","status":"affected"},{"type":"git","introduced":"1507f51255c9ff07d75909a84e7c0d7f3c4b2f49","fixed":"9c2b4b657739ecda38e3b383354a29566955ac48","status":"affected"},{"type":"git","introduced":"1507f51255c9ff07d75909a84e7c0d7f3c4b2f49","fixed":"43fad1d0284de30159661d0badfc3cbaf7e6f8f8","status":"affected"},{"type":"git","introduced":"1507f51255c9ff07d75909a84e7c0d7f3c4b2f49","fixed":"201e4aaf405dfd1308da54448654053004c579b5","status":"affected"},{"type":"git","introduced":"1507f51255c9ff07d75909a84e7c0d7f3c4b2f49","fixed":"65291dcfcf8936e1b23cfd7718fdfde7cfaf7706","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.14","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.14","status":"unaffected"},{"type":"semver","introduced":"5.15.154","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.85","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.26","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.8.5","lastAffected":"6.8.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.9","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.14","fixed":"5.15.154"},{"status":"affected","introduced":"5.16","fixed":"6.1.85"},{"status":"affected","introduced":"6.2","fixed":"6.6.26"},{"status":"affected","introduced":"6.7","fixed":"6.8.5"},{"status":"affected","version":"6.9"},{"status":"affected","version":"6.9"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/6564b014af92b677c1f07c44d7f5b595d589cf6e","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9c2b4b657739ecda38e3b383354a29566955ac48","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/43fad1d0284de30159661d0badfc3cbaf7e6f8f8","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/201e4aaf405dfd1308da54448654053004c579b5","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/65291dcfcf8936e1b23cfd7718fdfde7cfaf7706","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-05-20T15:13:36.224Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-35872","url":"https://www.cve.org/CVERecord?id=CVE-2024-35872","licence":"CVE Terms of Use","modified":"2026-08-05T11:30:33.747Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-35872","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-35872","licence":"Public domain","modified":"2026-08-04T11:18:03.793Z"}],"updatedAt":"2026-11-25T22:58:40.575Z","epss":{"score":0.00236,"percentile":0.15624,"date":"2026-12-01T12:00:22.000Z"}}