CVE-2026-93216: mm/page_owner: use memcg_data snapshot to avoid TOCTOU in print_page_owner_memcg()
In the Linux kernel, the following vulnerability has been resolved:
mm/pageowner: use memcgdata snapshot to avoid TOCTOU in printpageownermemcg()
printpageownermemcg() reads page->memcgdata via READONCE() at the start to guard against tail pages and NULL data. However, it later re-reads page->memcgdata locklessly in two places:
1: pagememcgcheck(page)
2: PageMemcgKmem(page) (via foliomemcgkmem(), which includes VMBUGON assertions for tail pages and MEMCGDATAOBJEXTS)
If the page is concurrently freed and reallocated as a THP tail page or slab page between these calls, the VMBUGON assertions can trigger on CONFIGDEBUGVM=y builds, crashing the kernel.
Fix both TOCTOU issues by using the memcgdata snapshot throughout.
Affected Software
Event History
Frequently Asked Questions
Which systems are most likely to be affected?
The crash condition is described for kernels built with CONFIG_DEBUG_VM=y. It requires page-owner memory-cgroup reporting to race with a page being freed and reallocated as a THP tail page or slab page.
What does an attacker or triggering workload need to do?
The issue depends on a concurrent timing window: page_owner code must read memcg metadata while the same page is freed and then reused in a form that violates the later debug assertions. The described impact is a kernel crash from VM_BUG_ON assertions.
How can I tell whether this issue has occurred?
On a CONFIG_DEBUG_VM=y kernel, an occurrence can manifest as a kernel crash caused by VM_BUG_ON assertions while page-owner memory-cgroup information is being printed. The vulnerable behavior involves lockless re-reads of page memcg data during that reporting path.