CVE-2026-64418
Gravedad:
Pendiente de análisis
Tipo:
No Disponible / Otro tipo
Fecha de publicación:
25/07/2026
Última modificación:
25/07/2026
Descripción
*** Pendiente de traducción *** In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
mm: shrinker: fix shrinker_info teardown race with expansion<br />
<br />
expand_shrinker_info() iterates all visible memcgs under shrinker_mutex,<br />
including memcgs that have not finished ->css_online() yet.<br />
<br />
Once pn->shrinker_info has been published, teardown must stay serialized<br />
with expand_shrinker_info() until that memcg is either fully online or no<br />
longer visible to iteration. Today alloc_shrinker_info() breaks that rule<br />
by dropping shrinker_mutex before freeing a partially initialized<br />
shrinker_info array, which may cause the following race:<br />
<br />
CPU0 CPU1<br />
==== ====<br />
<br />
css_create<br />
--> list_add_tail_rcu(&css->sibling, &parent_css->children);<br />
online_css<br />
--> mem_cgroup_css_online<br />
--> alloc_shrinker_info<br />
--> alloc node0 info<br />
rcu_assign_pointer(C->node0->shrinker_info, old0)<br />
alloc node1 info -> FAIL -> goto err<br />
mutex_unlock(shrinker_mutex)<br />
<br />
shrinker_alloc()<br />
--> shrinker_memcg_alloc<br />
--> mutex_lock(shrinker_mutex)<br />
expand_shrinker_info<br />
--> mem_cgroup_iter see the memcg<br />
expand_one_shrinker_info<br />
--> old0 = C->node0->shrinker_info<br />
memcpy(new->unit, old0->unit, ...);<br />
<br />
free_shrinker_info<br />
--> kvfree(old0);<br />
<br />
/* double free !! */<br />
kvfree_rcu(old0, rcu);<br />
<br />
The same problem exists later in mem_cgroup_css_online(). If<br />
alloc_shrinker_info() succeeds but a subsequent objcg allocation fails,<br />
the free_objcg -> free_shrinker_info() unwind path tears down the already<br />
published pn->shrinker_info arrays without shrinker_mutex. The<br />
expand_one_shrinker_info() can race with that teardown in the same way,<br />
leading to use-after-free or double-free of the old shrinker_info.<br />
<br />
Fix this by serializing shrinker_info teardown with shrinker_mutex, and by<br />
keeping alloc_shrinker_info() error cleanup inside the locked section.



