{"id":41290,"date":"2026-10-19T00:33:02","date_gmt":"2026-10-18T16:33:02","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-98818"},"modified":"2026-10-19T00:33:02","modified_gmt":"2026-10-18T16:33:02","slug":"cve-2026-98818","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-98818","title":{"rendered":"CVE-2026-98818 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nmm\/slab: do not wake"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>mm\/slab: do not wake up kswapd in __kfree_rcu_sheaf()<\/p>\n<p>Since kfree_rcu() can be called under pi_lock (a raw spinlock in the<br \/>\nscheduler), kfree_rcu() itself should never allocate memory with<br \/>\n__GFP_KSWAPD_RECLAIM as waking up kswapd ends up acquiring pi_lock,<br \/>\nwhich leads to a deadlock.<\/p>\n<p>Reproducing the issue even intentionally was not straightforward.<br \/>\nThe set_cpus_allowed_force() path that is called under pi_lock is<br \/>\nexercised very rarely, and competing tasks that allocate memory will<br \/>\nmost likely wake kswapd up.<\/p>\n<p>Therefore the existence of the deadlock was verified with a modified<br \/>\nkernel that has a lockdep map for waking up kswapd:<\/p>\n<p>  ======================================================<br \/>\n  WARNING: possible circular locking dependency detected<br \/>\n  7.2.0-rc1-slab-for-next+ #10 Not tainted<br \/>\n  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n  git\/6660 is trying to acquire lock:<br \/>\n  ffff8e524533c550 (&amp;p-&gt;pi_lock){-.-.}-{2:2}, at: _raw_spin_lock_irqsave+0x12\/0x20<\/p>\n<p>  but task is already holding lock:<br \/>\n  ffff8e57bffff1a0 (&amp;pgdat-&gt;kswapd_wait){&#8230;.}-{3:3}, at: _raw_spin_lock_irqsave+0x12\/0x20<\/p>\n<p>  which lock already depends on the new lock.<\/p>\n<p>  the existing dependency chain (in reverse order) is:<\/p>\n<p>  -&gt; #2 (&amp;pgdat-&gt;kswapd_wait){&#8230;.}-{3:3}:<br \/>\n         __lock_acquire+0x5a4\/0xc50<br \/>\n         lock_acquire.part.0+0xb7\/0x240<br \/>\n         lock_acquire+0x70\/0x170<br \/>\n         __raw_spin_lock_irqsave+0x44\/0x80<br \/>\n         _raw_spin_lock_irqsave+0x12\/0x20<br \/>\n         __wake_up_common_lock+0x31\/0xa0<br \/>\n         __wake_up+0x20\/0x40<br \/>\n         kswapd_wakeup_wake+0x7e\/0x110<br \/>\n         wakeup_kswapd+0x295\/0x320<br \/>\n         wake_all_kswapds+0xac\/0x1a0<br \/>\n         __alloc_pages_slowpath.constprop.0+0x282\/0xf80<br \/>\n         __alloc_frozen_pages_noprof+0x32a\/0x360<br \/>\n         alloc_slab_page+0x2e\/0x160<br \/>\n         allocate_slab+0x82\/0x420<br \/>\n         new_slab+0x52\/0xb0<br \/>\n         refill_objects+0x13d\/0x190<br \/>\n         refill_sheaf+0x5d\/0xd0<br \/>\n         __pcs_replace_empty_main+0x230\/0xb10<br \/>\n         [&#8230;]<\/p>\n<p>  -&gt; #1 (kswapd_wakeup){-.-.}-{0:0}:<br \/>\n         __lock_acquire+0x5a4\/0xc50<br \/>\n         lock_sync.part.0+0x75\/0x100<br \/>\n         lock_sync+0x36\/0x70<br \/>\n         might_wakeup_kswapd+0x61\/0xa0<br \/>\n         __kfree_rcu_sheaf+0x33\/0xd90<br \/>\n         kvfree_call_rcu+0x1d4\/0x3b0<br \/>\n         set_cpus_allowed_force+0x163\/0x220<br \/>\n         cpuset_cpus_allowed_fallback+0x18b\/0x240<br \/>\n         select_fallback_rq+0x1e6\/0x250<br \/>\n\t [&#8230;]<\/p>\n<p>  -&gt; #0 (&amp;p-&gt;pi_lock){-.-.}-{2:2}:<br \/>\n         check_prev_add+0xe6\/0xe00<br \/>\n         validate_chain+0x51e\/0x6e0<br \/>\n         __lock_acquire+0x5a4\/0xc50<br \/>\n         lock_acquire.part.0+0xb7\/0x240<br \/>\n         lock_acquire+0x70\/0x170<br \/>\n         __raw_spin_lock_irqsave+0x44\/0x80<br \/>\n         _raw_spin_lock_irqsave+0x12\/0x20<br \/>\n         try_to_wake_up+0x77\/0xa90<br \/>\n         default_wake_function+0x27\/0x60<br \/>\n         autoremove_wake_function+0x23\/0xb0<br \/>\n         __wake_up_common+0xb8\/0x170<br \/>\n         __wake_up_common_lock+0x51\/0xa0<br \/>\n         __wake_up+0x20\/0x40<br \/>\n         kswapd_wakeup_wake+0x7e\/0x110<br \/>\n         wakeup_kswapd+0x295\/0x320<br \/>\n         wake_all_kswapds+0xac\/0x1a0<br \/>\n         __alloc_pages_slowpath.constprop.0+0x282\/0xf80<br \/>\n         __alloc_frozen_pages_noprof+0x32a\/0x360<br \/>\n         alloc_slab_page+0x2e\/0x160<br \/>\n         allocate_slab+0x82\/0x420<br \/>\n         new_slab+0x52\/0xb0<br \/>\n         refill_objects+0x13d\/0x190<br \/>\n         refill_sheaf+0x5d\/0xd0<br \/>\n         __pcs_replace_empty_main+0x230\/0xb10<br \/>\n         [&#8230;]<\/p>\n<p>  other info that might help us debug this:<\/p>\n<p>  Chain exists of:<br \/>\n    &amp;p-&gt;pi_lock &#8211;&gt; kswapd_wakeup &#8211;&gt; &amp;pgdat-&gt;kswapd_wait<\/p>\n<p>   Possible unsafe locking scenario:<\/p>\n<p>         CPU0                    CPU1<br \/>\n         &#8212;-                    &#8212;-<br \/>\n    lock(&amp;pgdat-&gt;kswapd_wait);<br \/>\n                                 lock(kswapd_wakeup);<br \/>\n                                 lock(&amp;pgdat-&gt;kswapd_wait);<br \/>\n    lock(&amp;p-&gt;pi_lock);<\/p>\n<p>   *** DEADLOCK ***<\/p>\n<p>  3 locks held by git\/6660:<br \/>\n   #0: ffff8e519f0e9e20 (&amp;type-&gt;i_mutex_dir_key#6){++++}-{4:4}, at: lookup_slow+0x2d\/0x60<br \/>\n   #1: ffffffff8a31c460 (kswapd_wakeup){-.-.}-<br \/>\n&#8212;truncated&#8212;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>mm\/slab: do not wake up kswapd in __kfree_rcu_sheaf()<\/p>\n<p>Since kfree_rcu() can be called under pi_lock (a raw spinlock in the<br \/>\nschedul<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-41290","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/41290","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=41290"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=41290"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=41290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}