Skip to contentSkip to conversation

CVE-2026-53153: mm/list_lru: drain before clearing xarray entry on reparent

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Jun 25

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/list_lru: drain before clearing xarray entry on reparent

memcg_reparent_list_lrus() clears the dying memcg's xarray entry with xas_store(&xas, NULL) before reparenting its per-node lists into the parent. This opens a window where a concurrent list_lru_del() arriving for the dying memcg sees xa_load() == NULL, walks to the parent in lock_list_lru_of_memcg(), takes the parent's per-node lock, and calls list_del_init() on an item still physically linked on the dying memcg's list.

If another in-flight thread holds the dying memcg's per-node lock at the same moment (another list_lru_del, or a list_lru_walk_one running an isolate callback), both threads modify ->next/->prev pointers on the same physical list under different locks. Adjacent items can corrupt each other's links.

Fix it by reversing the order: reparent each per-node list and mark the child's list lru dead and then clear the xarray entry. Any concurrent list_lru op that finds the still-set xarray entry either takes the dying memcg's per-node lock (synchronizing with the drain) or sees LONG_MIN and walks to the parent, where the items now live.

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

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

	Issue introduced in 6.13 with commit fb56fdf8b9a2f7397f8a83dce50189f3f0cf71af and fixed in 6.18.36 with commit c19ff4351214f059349788e13e70e74325831ff6
	Issue introduced in 6.13 with commit fb56fdf8b9a2f7397f8a83dce50189f3f0cf71af and fixed in 7.0.13 with commit 2b66496d794e98f7aeec7688573051f22ec40bac
	Issue introduced in 6.13 with commit fb56fdf8b9a2f7397f8a83dce50189f3f0cf71af and fixed in 7.1 with commit 98733f3f0becb1ae0701d021c1748e974e5fa55c

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

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/list_lru.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/c19ff4351214f059349788e13e70e74325831ff6
	https://git.kernel.org/stable/c/2b66496d794e98f7aeec7688573051f22ec40bac
	https://git.kernel.org/stable/c/98733f3f0becb1ae0701d021c1748e974e5fa55c