{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-99463","id":"CVE-2026-99463","title":"Linux kernel use-after-free in lazyfree THP handling","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/rmap: don't discard lazyfree THPs at PMD level\n\n__discard_anon_folio_pmd_locked() clears a lazyfree THP's PMD before it\ndetermines whether the folio can be discarded, and restores it if the\nfolio is dirty or has extra references.  It is done under only the PMD\nlock and the anon_vma read lock inside try_to_unmap_one() and no mm","descriptionLong":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/rmap: don't discard lazyfree THPs at PMD level\n\n__discard_anon_folio_pmd_locked() clears a lazyfree THP's PMD before it\ndetermines whether the folio can be discarded, and restores it if the\nfolio is dirty or has extra references.  It is done under only the PMD\nlock and the anon_vma read lock inside try_to_unmap_one() and no mmap lock\nis held.  The temporarily none PMD causes UAF.\n\nA parallel munmap() or mremap() is supposed to serialize with it on the\nPMD lock, but zap_pmd_range() (called by munmap()) and move_page_tables()\n(called by mremap()) do not take the lock when they see the temporarily\nnone PMD and skip the PMD.  There is no more page table walk after the\nnone PMD is restored:\n\n- munmap(): free_pgtables() waits in unlink_anon_vmas() for the anon_vma\n  lock, then free_pmd_range() drops the restored PMD as bad without\n  removing the rmap, so the folio keeps a stale mapcount.\n\n- whole-VMA MREMAP_DONTUNMAP: dontunmap_complete() unlinks the source VMA\n  from its anon_vma while the restored PMD still maps the folio.\n\n- plain mremap(): the THP is not moved but unmapped, so the THP's data is\n  lost.\n\nIn the first two cases, the folio stays mapped, but no VMA that maps it is\nlinked to its anon_vma.  When the anon_vma is freed, it is still reachable\nwhen one rmap walks the folio.  Racing lazyfree reclaim against\nMREMAP_DONTUNMAP as an unprivileged user reproduces a KASAN use-after-free\nin folio_lock_anon_vma_read() as reported in the Closes link.\n\nOne solution is to use an invalidated PMD instead of a cleared one until\nthe discard is committed, but it needs arch fixes first.\n1. GUP-fast still follows an invalidated PMD on riscv, LoongArch and s390.\n2. sparc64 miscounts thp_pte_count when an invalidated PMD is set again or\n   cleared.\n\nTo keep the fix simple for backport, stop discarding lazyfree THPs at PMD\nlevel instead. try_to_unmap_one() splits the PMD and discards the folio at\nPTE level.\n\nunmap_huge_pmd_locked() and __discard_anon_folio_pmd_locked() are left in\nplace, unused, to minimize this fix for backport and the invalidated PMD\napproach is planned as a follow-up series to use them again.","published":"2026-11-19T14:42:16.661Z","updated":"2026-11-19T17:01:21.630869493Z","reserved":"2026-09-25T10:25:14.416Z","status":"Received","rejected":false,"assigner":"Linux","metric":null,"metrics":[],"rating":"unrated","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"735ecdfaf4e802209caf34b7ac45adf448c54ccc","lessThan":"8cf9517996067cfbfc5abdb4cfb3d7e15a7b34a3","status":"affected","versionType":"git"},{"version":"735ecdfaf4e802209caf34b7ac45adf448c54ccc","lessThan":"3594027c292b09d9301b4be80fa8e0c815ffaf2a","status":"affected","versionType":"git"},{"version":"735ecdfaf4e802209caf34b7ac45adf448c54ccc","lessThan":"b8c683bd548268453d50e933aab2e7d50a7ac2be","status":"affected","versionType":"git"},{"version":"735ecdfaf4e802209caf34b7ac45adf448c54ccc","lessThan":"984c0700854e35779a2bcce6b02783e709b6efa2","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.11","status":"affected"},{"version":"0","lessThan":"6.11","status":"unaffected","versionType":"semver"},{"version":"6.12.117","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.18.61","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"7.3.2","lessThanOrEqual":"7.3.*","status":"unaffected","versionType":"semver"},{"version":"7.4-rc1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":[],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/8cf9517996067cfbfc5abdb4cfb3d7e15a7b34a3","tags":["web"]},{"url":"https://git.kernel.org/stable/c/3594027c292b09d9301b4be80fa8e0c815ffaf2a","tags":["web"]},{"url":"https://git.kernel.org/stable/c/b8c683bd548268453d50e933aab2e7d50a7ac2be","tags":["web"]},{"url":"https://git.kernel.org/stable/c/984c0700854e35779a2bcce6b02783e709b6efa2","tags":["web"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99463.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99463","tags":["advisory"]}],"patchReferenced":false,"fixAvailable":false,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":null,"epssPercentile":null,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-99463","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99463","ok":true,"note":"Received"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-99463","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-2026-99463","ok":false,"note":"no score yet"}],"aiTitle":true,"tech":[],"critical":[],"attention":null}