CVE-2026-99668: mm/huge_memory: fix zapping migration entries for device-private THPs
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
mm/huge_memory: fix zapping migration entries for device-private THPs
A PMD migration entry can refer to a device-private folio. zap_huge_pmd_folio() checks the folio type instead of the entry type, so it treats such a migration entry as a device-private entry.
Installing the migration entry already removed the reverse mapping and dropped the mapping reference. Zapping it must not repeat those operations. Concurrent MADV_DONTNEED during migration back to system memory can trigger this.
Check the PMD entry type using pmd_is_device_private_entry().
Fix generated by an LLM and sent by Chris Mason in private.
[ david: simplify description ]
The Linux kernel CVE team has assigned CVE-2026-99668 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.19 with commit 368076f52ebeecd33e10a9f80905d7508b6b6149 and fixed in 7.3.5 with commit 2d7e94a16d0d33ce2cce5ea06cf61079c392d351 Issue introduced in 6.19 with commit 368076f52ebeecd33e10a9f80905d7508b6b6149 and fixed in 7.4-rc2 with commit 63a940541358d09cc9f02d40b71eb8d3917a21c0
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-99668
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
mm/huge_memory.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/2d7e94a16d0d33ce2cce5ea06cf61079c392d351 https://git.kernel.org/stable/c/63a940541358d09cc9f02d40b71eb8d3917a21c0