{"id":"CVE-2026-99664","summary":"mm/gup: recheck the PUD under PTL in follow_pud_mask()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/gup: recheck the PUD under PTL in follow_pud_mask()\n\nfollow_pud_mask() reads the PUD without a lock. If it is a leaf, it takes\nthe lock and calls follow_huge_pud(), which reads the entry again, but\nonly tests whether it is present.\n\nA leaf can be zapped concurrently and a page fault can fill the empty\nentry with a page table.\n\nThis currently only applies when device-dax makes use of PUD entries,\nand the fault after e.g., MADV_DONTNEED would find THPs to be disabled.\n\nThat requires a sequence like\n\n1) Fault in the PUD\n2) Disable THP\n3) Have GUP race against concurrent MADV_DONTNEED + refault\n\nWhich is rather unlikely to happen in practice, which is why we never\nreceived a report about such a problem.\n\nBefore commit 1b1676180246 (\"mm/gup: handle huge pud for\nfollow_pud_mask()\"), we performed that check in follow_devmap_pud() by\ntesting for pud_devmap().\n\nLet's fix it by just structuring follow_pud_mask() similar to\nfollow_pmd_mask(), minus protnone stuff that does not apply and minus\nFOLL_SPLIT_PMD handling. That makes it much easier to spot any such\ninconsistencies.\n\nPerform the pud_bad() check early in follow_pmd_mask() and just forward\nthe PUD value. We can drop the pud_present() check in follow_huge_pud(),\njust like we have in follow_huge_pmd().\n\nEven though we are performing more changes than strictly necessary, the\nfix should be easy to backport.","modified":"2026-11-20T07:01:06.691432430Z","published":"2026-11-20T05:50:14.863Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99664.json","cna_assigner":"Linux"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/79cb51d538abc459f74e046d27797d36b133ce0e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9eaedd598cd25eb0e18958e2456153a4c1f3db03"},{"type":"WEB","url":"https://git.kernel.org/stable/c/da57b6bce646946c083a48df644d43bb9d011f5f"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99664.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99664"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"1b1676180246232308885c4f37fee01cf898fdb2"},{"fixed":"da57b6bce646946c083a48df644d43bb9d011f5f"},{"fixed":"9eaedd598cd25eb0e18958e2456153a4c1f3db03"},{"fixed":"79cb51d538abc459f74e046d27797d36b133ce0e"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-99664.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.10.0"},{"fixed":"6.18.64"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.5"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-99664.json"}}],"schema_version":"1.9.2"}