CVE-2026-64418

Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
25/07/2026
Last modified:
25/07/2026

Description

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 -&gt;css_online() yet.<br /> <br /> Once pn-&gt;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 /> --&gt; list_add_tail_rcu(&amp;css-&gt;sibling, &amp;parent_css-&gt;children);<br /> online_css<br /> --&gt; mem_cgroup_css_online<br /> --&gt; alloc_shrinker_info<br /> --&gt; alloc node0 info<br /> rcu_assign_pointer(C-&gt;node0-&gt;shrinker_info, old0)<br /> alloc node1 info -&gt; FAIL -&gt; goto err<br /> mutex_unlock(shrinker_mutex)<br /> <br /> shrinker_alloc()<br /> --&gt; shrinker_memcg_alloc<br /> --&gt; mutex_lock(shrinker_mutex)<br /> expand_shrinker_info<br /> --&gt; mem_cgroup_iter see the memcg<br /> expand_one_shrinker_info<br /> --&gt; old0 = C-&gt;node0-&gt;shrinker_info<br /> memcpy(new-&gt;unit, old0-&gt;unit, ...);<br /> <br /> free_shrinker_info<br /> --&gt; 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 -&gt; free_shrinker_info() unwind path tears down the already<br /> published pn-&gt;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.

Impact