{"id":39085,"date":"2026-10-16T00:35:00","date_gmt":"2026-10-15T16:35:00","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-98414"},"modified":"2026-10-16T00:35:00","modified_gmt":"2026-10-15T16:35:00","slug":"cve-2026-98414","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-98414","title":{"rendered":"CVE-2026-98414 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nmemcg: avoid charging"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>memcg: avoid charging the root memcg from obj_cgroup_charge_pages()<\/p>\n<p>obj_cgroup_charge_pages() resolves the objcg to its memcg and calls<br \/>\ntry_charge_memcg(), which does not short circuit the root memcg.  That<br \/>\nmemcg can be the root memcg: obj_cgroup_is_root() reflects the memcg the<br \/>\nobjcg was created for and is never updated, while memcg_reparent_objcgs()<br \/>\ndoes redirect objcg-&gt;memcg to the parent on rmdir.  An objcg of a dying<br \/>\nchild of root therefore passes every obj_cgroup_is_root() filter but<br \/>\nresolves to the root memcg.<\/p>\n<p>Folios keep the objcg they were charged with, so this is easy to reach<br \/>\nthrough zswap: allocate anon memory in a cgroup, move the task out, remove<br \/>\nthe cgroup, then write to the root cgroup&#8217;s memory.reclaim.  The reclaimed<br \/>\nfolios are charged through the reparented objcg and end up in<br \/>\nrefill_stock() with the root memcg:<\/p>\n<p>  WARNING: mm\/memcontrol.c:2198 at refill_stock+0x644\/0x940<br \/>\n   refill_stock+0x644\/0x940<br \/>\n   try_charge_memcg+0x12d6\/0x1570<br \/>\n   __obj_cgroup_charge+0x35\/0xf0<br \/>\n   obj_cgroup_charge+0x1de\/0x210<br \/>\n   obj_cgroup_charge_zswap+0x83\/0x270<br \/>\n   zswap_store+0x1620\/0x2000<br \/>\n   swap_writeout+0x94c\/0x14c0<br \/>\n   shrink_folio_list+0x3388\/0x52b0<br \/>\n   [&#8230;]<br \/>\n   try_to_free_mem_cgroup_pages+0x30d\/0x830<br \/>\n   user_proactive_reclaim+0x504\/0x840<br \/>\n   memory_reclaim+0x1f\/0x30<\/p>\n<p>Beyond the warning, the charge is asymmetric: obj_cgroup_uncharge_pages()<br \/>\nskips refill_stock() for the root memcg, so the root&#8217;s page counter grows<br \/>\nand is never uncharged.  It is not user visible, since memory.current is<br \/>\nnot exposed on the root, but it is a leak.<\/p>\n<p>Use try_charge(), which returns early for the root memcg, restoring the<br \/>\nsymmetry with obj_cgroup_uncharge_pages().<\/p>\n<p>The above sequence was scripted into a standalone reproducer (zswap on,<br \/>\nswap on a virtio disk, 512MB of anon memory faulted in inside a child of<br \/>\nthe root cgroup, the task then migrated to the root cgroup, the child<br \/>\nremoved, followed by &#8220;echo 600M swappiness=max &gt; memory.reclaim&#8221; on the<br \/>\nroot) and run in a CONFIG_DEBUG_VM=y VM.  It reproduces the splat on the<br \/>\nfirst zswap store of a reparented folio, with the same call chain as the<br \/>\nreport.  With this patch applied the splat is gone while the zswap store<br \/>\ncount over the run is unchanged, so the same path is still exercised.<br \/>\ncgroup selftests test_zswap, test_kmem and test_memcontrol show no new<br \/>\nfailures.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>memcg: avoid charging the root memcg from obj_cgroup_charge_pages()<\/p>\n<p>obj_cgroup_charge_pages() resolves the objcg to its memcg and <\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-39085","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/39085","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln"}],"about":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/types\/vuln"}],"wp:attachment":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=39085"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=39085"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=39085"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}