Skip to contentSkip to conversation

CVE-2026-93216: mm/page_owner: use memcg_data snapshot to avoid TOCTOU in print_page_owner_memcg()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 24

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

mm/page_owner: use memcg_data snapshot to avoid TOCTOU in print_page_owner_memcg()

print_page_owner_memcg() reads page->memcg_data via READ_ONCE() at the start to guard against tail pages and NULL data. However, it later re-reads page->memcg_data locklessly in two places:

1: page_memcg_check(page)

2: PageMemcgKmem(page) (via folio_memcg_kmem(), which includes
VM_BUG_ON assertions for tail pages and MEMCG_DATA_OBJEXTS)

If the page is concurrently freed and reallocated as a THP tail page or slab page between these calls, the VM_BUG_ON assertions can trigger on CONFIG_DEBUG_VM=y builds, crashing the kernel.

Fix both TOCTOU issues by using the memcg_data snapshot throughout.

The Linux kernel CVE team has assigned CVE-2026-93216 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 5.18 with commit fcf8935832b86d3437f00e732c6d0d4d2819d6a9 and fixed in 7.2.4 with commit 46761406e14381dc35f498c247a87565b87ea2ef
	Issue introduced in 5.18 with commit fcf8935832b86d3437f00e732c6d0d4d2819d6a9 and fixed in 7.3-rc1 with commit 90f095b816e25c6a9e4446d299bac5007fdcb3df

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-93216

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/page_owner.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/46761406e14381dc35f498c247a87565b87ea2ef
	https://git.kernel.org/stable/c/90f095b816e25c6a9e4446d299bac5007fdcb3df