CVE-2026-99463: mm/rmap: don't discard lazyfree THPs at PMD level

Published Nov 19, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

mm/rmap: don't discard lazyfree THPs at PMD level

discardanonfoliopmdlocked() clears a lazyfree THP's PMD before it determines whether the folio can be discarded, and restores it if the folio is dirty or has extra references. It is done under only the PMD lock and the anonvma read lock inside trytounmapone() and no mmap lock is held. The temporarily none PMD causes UAF.

A parallel munmap() or mremap() is supposed to serialize with it on the PMD lock, but zappmdrange() (called by munmap()) and movepagetables() (called by mremap()) do not take the lock when they see the temporarily none PMD and skip the PMD. There is no more page table walk after the none PMD is restored:

- munmap(): freepgtables() waits in unlinkanonvmas() for the anonvma lock, then freepmdrange() drops the restored PMD as bad without removing the rmap, so the folio keeps a stale mapcount.

- whole-VMA MREMAPDONTUNMAP: dontunmapcomplete() unlinks the source VMA from its anonvma while the restored PMD still maps the folio.

- plain mremap(): the THP is not moved but unmapped, so the THP's data is lost.

In the first two cases, the folio stays mapped, but no VMA that maps it is linked to its anonvma. When the anonvma is freed, it is still reachable when one rmap walks the folio. Racing lazyfree reclaim against MREMAPDONTUNMAP as an unprivileged user reproduces a KASAN use-after-free in foliolockanonvmaread() as reported in the Closes link.

One solution is to use an invalidated PMD instead of a cleared one until the discard is committed, but it needs arch fixes first. 1. GUP-fast still follows an invalidated PMD on riscv, LoongArch and s390. 2. sparc64 miscounts thpptecount when an invalidated PMD is set again or cleared.

To keep the fix simple for backport, stop discarding lazyfree THPs at PMD level instead. trytounmapone() splits the PMD and discards the folio at PTE level.

unmaphugepmdlocked() and discardanonfoliopmdlocked() are left in place, unused, to minimize this fix for backport and the invalidated PMD approach is planned as a follow-up series to use them again.

Affected Software

3 affected componentsFixes available
linux/kernel>=6.11.0<6.12.117
6.12.117
linux/kernel>=6.13.0<6.18.61
6.18.61
linux/kernel>=6.19.0<7.3.2
7.3.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.12.117
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.18.61
  3. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.2

Event History

Nov 19, 2026
CVE Published
via MITRE·02:42 PM
Data Sourced
via MITRE·02:42 PM
Description
Data Sourced
via OSV·02:42 PM
DescriptionAffected Software
Data Sourced
via NVD·03:18 PM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203