{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-99735","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-09-25T10:25:14.431Z","datePublished":"2026-11-20T05:51:09.038Z","dateUpdated":"2026-11-22T11:09:56.458Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-11-22T11:09:56.458Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/mglru: don't use stack pointers when walking PUD and PMD tables\n\nMGLRU passes stack copies of page-table entries in walk_pud_range() and\nwalk_pmd_range() when walking to the next level. These copies can become\nstale when khugepaged or MADV_DONTNEED (CONFIG_PT_RECLAIM) removes a PTE\ntable concurrently.\n\nThis pattern dates back to commit bd74fdaea146 (\"mm: multi-gen LRU:\nsupport page table walks\"). Likely, earlier locking masked the latent\nbug. Later changes exposed it: commit 1d65b771bc08 (\"mm/khugepaged:\nretract_page_tables() without mmap or vma lock\") allowed concurrent\nretraction, and commit cf4a65539c13 (\"memcg-v1: no need for memcg locking\nfor MGLRU\") dropped the walker's outer RCU protection.\n\nThe fix is simple, so just fix the original commit so we don't have to\nspeculate. To fix it, pass the actual PMD/PUD pointers. This restores the\nRCU-protected lookup and validation against the live PMD. Note that the PUD\nhandling is required as well to handle folded page tables correctly in all\ncases.\n\nFix generated by an LLM and sent by Josef Bacik in private.\n\n[ david: handle walk_pud_range() as well, clarify+simplify description,\n         adjust Fixes: ]"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - Reclaim snapshots the PMD in walk_pmd_range() via shrink_node() → lru_gen_shrink_node()/lru_gen_shrink_lruvec() → try_to_inc_max_seq() → walk_mm(). The PTE page is removed locally by do_madvise(MADV_DONTNEED) in zap_empty_pte_table()'s pmd_clear(), or by retract_page_tables()'s pmdp_collapse_flush(); no network message carries the entry.\nAC:L - The attacker runs the mm (lru_gen_use_mm() sets lru_gen.bitmap so get_next_mm() selects it) and, from another thread, MADV_DONTNEED under the vma read lock, which does not block walk_mm()'s mmap_read_trylock(). That thread pmd_clears the table and call_rcu-frees it before walk_pte_range() uses the stack copy in val. Both sides are the attacker's.\nPR:L - do_madvise(MADV_DONTNEED) and direct reclaim through try_to_free_pages() → shrink_node() check no capability. An unprivileged task that can mmap, fault, madvise, and allocate reaches walk_pmd_range() on its own mm.\nUI:N - The attacker faults its own mapping, calls madvise(MADV_DONTNEED), and allocates until direct reclaim runs walk_mm(). No other user has to mount, open, or approve the operation.\nS:U - The use-after-free hits the PTE page and its struct page in the kernel that is executing walk_mm(), the same security authority as the local user.\nC:H - walk_pte_range() passes &val to pte_offset_map_rw_nolock(), so __pte_offset_map() reads the stack copy under rcu_read_lock and pmd_same() compares that copy with itself. ptep_get() then reads the page after pagetable_dtor_free(); PTEs planted in the reused page make get_pfn_folio() follow attacker-chosen PFNs.\nI:H - Because that pmd_same() check matches the stack copy against itself, spin_trylock(pte_lockptr()) writes ptdesc->ptl, which overlays struct page's private/slab_cache field after reuse, and test_and_clear_young_ptes() atomically clears the young bit there. A PFN taken from that memory also reaches folio_update_gen()'s cmpxchg of folio->flags.\nA:H - zap_empty_pte_table() or retract_page_tables() frees the PTE page through tlb_remove_table_rcu() or pte_free_defer() while walk_pte_range() still locks and writes it. That use-after-free oopses the kernel or corrupts allocator metadata and takes the system down."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/vmscan.c"],"versions":[{"version":"bd74fdaea146029e4fa12c6de89adbe0779348a9","lessThan":"a352391f8f9c035d3b2a8a9fe6e3fd2e1c4ec44e","status":"affected","versionType":"git"},{"version":"bd74fdaea146029e4fa12c6de89adbe0779348a9","lessThan":"4b428d9d24e303f92819119c66858f5de38bbc78","status":"affected","versionType":"git"},{"version":"bd74fdaea146029e4fa12c6de89adbe0779348a9","lessThan":"4e5eb180d37cb222ed3c9b6772c6044e16c2a1c3","status":"affected","versionType":"git"},{"version":"bd74fdaea146029e4fa12c6de89adbe0779348a9","lessThan":"65a9bf08a3e4d6e58df211ed900c16bafb79b267","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/vmscan.c"],"versions":[{"version":"6.1","status":"affected"},{"version":"0","lessThan":"6.1","status":"unaffected","versionType":"semver"},{"version":"6.12.118","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.18.64","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"7.3.5","lessThanOrEqual":"7.3.*","status":"unaffected","versionType":"semver"},{"version":"7.4-rc2","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.12.118"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.18.64"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"7.3.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"7.4-rc2"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/a352391f8f9c035d3b2a8a9fe6e3fd2e1c4ec44e"},{"url":"https://git.kernel.org/stable/c/4b428d9d24e303f92819119c66858f5de38bbc78"},{"url":"https://git.kernel.org/stable/c/4e5eb180d37cb222ed3c9b6772c6044e16c2a1c3"},{"url":"https://git.kernel.org/stable/c/65a9bf08a3e4d6e58df211ed900c16bafb79b267"}],"title":"mm/mglru: don't use stack pointers when walking PUD and PMD tables","x_generator":{"engine":"bippy-1.2.0"}}}}