Skip to content
statance
MenuClose
unknown

CVE-2026-99463

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

Published 19 Nov 2026 · Source updated 19 Nov 2026 · Retrieved 2026-11-19 15:23 UTC

Monitor this CVE ↗Full CVE monitoring on Pro and Business

What happened?

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

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

__discard_anon_folio_pmd_locked() 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 anon_vma read lock inside try_to_unmap_one() 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 zap_pmd_range() (called by munmap()) and move_page_tables() (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(): free_pgtables() waits in unlink_anon_vmas() for the anon_vma lock, then free_pmd_range() drops the restored PMD as bad without removing the rmap, so the folio keeps a stale mapcount.

- whole-VMA MREMAP_DONTUNMAP: dontunmap_complete() unlinks the source VMA from its anon_vma 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 anon_vma. When the anon_vma is freed, it is still reachable when one rmap walks the folio. Racing lazyfree reclaim against MREMAP_DONTUNMAP as an unprivileged user reproduces a KASAN use-after-free in folio_lock_anon_vma_read() 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 thp_pte_count when an invalidated PMD is set again or cleared.

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

unmap_huge_pmd_locked() and __discard_anon_folio_pmd_locked() 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.

Description supplied by CVE Program. Formatting is simplified; follow the original advisory for full details.

Affected software and versions

Source-provided software and version information
SoftwareVersion informationFixed version
LinuxLinuxaffected: 735ecdfaf4e802209caf34b7ac45adf448c54ccc to < 8cf9517996067cfbfc5abdb4cfb3d7e15a7b34a3; affected: 735ecdfaf4e802209caf34b7ac45adf448c54ccc to < 3594027c292b09d9301b4be80fa8e0c815ffaf2a; affected: 735ecdfaf4e802209caf34b7ac45adf448c54ccc to < b8c683bd548268453d50e933aab2e7d50a7ac2be; affected: 735ecdfaf4e802209caf34b7ac45adf448c54ccc to < 984c0700854e35779a2bcce6b02783e709b6efa2See vendor advisory
LinuxLinuxaffected: 6.11; unaffected: 0 to < 6.11; unaffected: 6.12.117 to ≤ 6.12.*; unaffected: 6.18.61 to ≤ 6.18.*; unaffected: 7.3.2 to ≤ 7.3.*; unaffected: 7.4-rc1 to ≤ *See vendor advisory

Version information comes from the source record and can include unaffected products and exceptions. Distribution packages may contain backported fixes: an older upstream version alone does not prove a server is affected.

Is it being exploited?

This CVE was not listed in the CISA catalogue at our last retrieval. This does not establish that exploitation is absent.

CISA data retrieved 2026-11-19 21:16 UTC. Check CISA ↗

How to respond

  1. Confirm the product, installed package version, and any configuration requirements in the vendor advisory.
  2. Follow the vendor’s remediation or workaround guidance in the references below. Structured fixed-version data is unavailable here; the publisher’s description may include a fix or workaround.
  3. Restart affected services if required, then verify the running version. Known exploitation may warrant investigation as well as patching.

Sources and remediation references

This public advisory does not determine whether a particular server is affected. Records are refreshed as sources change; verify urgent decisions against the original advisory.

← Browse the public CVE feed