{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-35872","id":"CVE-2024-35872","title":"mm/secretmem: fix GUP-fast succeeding on secretmem folios","description":"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","descriptionLong":"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.","published":"2024-05-19T08:34:30.096Z","updated":"2026-10-28T02:31:12.386766981Z","reserved":"2024-05-17T13:50:33.108Z","status":"Modified","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"Linux"},"metrics":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"Linux"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"}],"rating":"high","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1507f51255c9ff07d75909a84e7c0d7f3c4b2f49","lessThan":"6564b014af92b677c1f07c44d7f5b595d589cf6e","status":"affected","versionType":"git"},{"version":"1507f51255c9ff07d75909a84e7c0d7f3c4b2f49","lessThan":"9c2b4b657739ecda38e3b383354a29566955ac48","status":"affected","versionType":"git"},{"version":"1507f51255c9ff07d75909a84e7c0d7f3c4b2f49","lessThan":"43fad1d0284de30159661d0badfc3cbaf7e6f8f8","status":"affected","versionType":"git"},{"version":"1507f51255c9ff07d75909a84e7c0d7f3c4b2f49","lessThan":"201e4aaf405dfd1308da54448654053004c579b5","status":"affected","versionType":"git"},{"version":"1507f51255c9ff07d75909a84e7c0d7f3c4b2f49","lessThan":"65291dcfcf8936e1b23cfd7718fdfde7cfaf7706","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.14","status":"affected"},{"version":"0","lessThan":"5.14","status":"unaffected","versionType":"semver"},{"version":"5.15.154","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.1.85","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.26","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.8.5","lessThanOrEqual":"6.8.*","status":"unaffected","versionType":"semver"},{"version":"6.9","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":[],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/6564b014af92b677c1f07c44d7f5b595d589cf6e","tags":["x_transferred","Patch","web"]},{"url":"https://git.kernel.org/stable/c/9c2b4b657739ecda38e3b383354a29566955ac48","tags":["x_transferred","Patch","web"]},{"url":"https://git.kernel.org/stable/c/43fad1d0284de30159661d0badfc3cbaf7e6f8f8","tags":["x_transferred","Patch","web"]},{"url":"https://git.kernel.org/stable/c/201e4aaf405dfd1308da54448654053004c579b5","tags":["x_transferred","Patch","web"]},{"url":"https://git.kernel.org/stable/c/65291dcfcf8936e1b23cfd7718fdfde7cfaf7706","tags":["x_transferred","Patch","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/35xxx/CVE-2024-35872.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-35872","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00236,"epssPercentile":0.1477,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-35872","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-35872","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-35872","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-35872","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}