{"id":29097,"date":"2026-09-25T20:31:52","date_gmt":"2026-09-25T12:31:52","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-97941"},"modified":"2026-09-25T20:31:52","modified_gmt":"2026-09-25T12:31:52","slug":"cve-2026-97941","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-97941","title":{"rendered":"CVE-2026-97941 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nmm\/slab: take n-&gt;list"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>mm\/slab: take n-&gt;list_lock in __slab_try_return_freelist() to avoid race<\/p>\n<p>Commit ba7425312607 (&#8220;mm, slab: add an optimistic<br \/>\n__slab_try_return_freelist()&#8221;) incorrectly assumed that nobody has freed<br \/>\nan object to the slab as long as slab-&gt;freelist is NULL and cmpxchg<br \/>\nsucceeds.<\/p>\n<p>However, as reported by Hyunwoo Kim [1], other CPUs might have freed<br \/>\nan object to the slab, insert the slab to the partial list, then<br \/>\nallocated an object from the slab, and be in the middle of removing<br \/>\nthe slab from the list under n-&gt;list_lock.<\/p>\n<p>Since __refill_objects_node() puts the slab back on pc.slabs<br \/>\noutside n-&gt;list_lock, it might insert the slab into that list while<br \/>\nthe slab is concurrently being removed from n-&gt;partial.<br \/>\nThis led to a list corruption [1]:<\/p>\n<p>  list_add corruption. next-&gt;prev should be prev<br \/>\n  (ffff888100000248), but was dead000000000122.<br \/>\n  (next=ffffea000416e410).<br \/>\n  kernel BUG at lib\/list_debug.c:29!<br \/>\n  Oops: invalid opcode: 0000 [#1] SMP NOPTI<br \/>\n  CPU: 1 UID: 65534 PID: 144 Comm: poc Not tainted<br \/>\n  7.2.0-16172-gcf72cbb39da8-dirty #1 PREEMPT(lazy)<br \/>\n  RIP: 0010:__list_add_valid_or_report+0x80\/0xd0<br \/>\n  &#8230;<br \/>\n  Call Trace:<br \/>\n   alloc_from_new_slab+0x183\/0x300<br \/>\n   ___slab_alloc+0x31c\/0x890<br \/>\n   __kmalloc_noprof+0x3d4\/0x800<br \/>\n   lsm_blob_alloc+0x2d\/0x50<br \/>\n   security_msg_msg_alloc+0x26\/0x90<br \/>\n   load_msg+0x1aa\/0x210<br \/>\n   do_msgsnd+0x91\/0x800<br \/>\n   do_syscall_64+0x109\/0x5d0<br \/>\n   entry_SYSCALL_64_after_hwframe+0x77\/0x7f<br \/>\n  &#8230;<br \/>\n  Kernel panic &#8211; not syncing: Fatal exception<\/p>\n<p>This is a classic ABA problem where cmpxchg succeeds but the state has<br \/>\nchanged since __refill_objects_node() took the freelist from the slab.<\/p>\n<p>As Vlastimil Babka mentioned [2], it should be rare to return more than<br \/>\none slab (due to the racy read of slab-&gt;counters in<br \/>\nget_partial_node_bulk()). Therefore, instead of introducing additional<br \/>\ncomplexity, acquire and release n-&gt;list_lock twice in the worst case.<\/p>\n<p>Return the slab directly to the partial list and hold n-&gt;list_lock<br \/>\nacross the cmpxchg and add_partial(). This is similar to the initial<br \/>\nversion of commit ba7425312607 [3]. This is enough to avoid the race as<br \/>\nthe list manipulation is serialized by n-&gt;list_lock. While at it,<br \/>\nbring back unlikely() hint now that the condition is unlikely.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>mm\/slab: take n-&gt;list_lock in __slab_try_return_freelist() to avoid race<\/p>\n<p>Commit ba7425312607 (&#8220;mm, slab: add an optimistic<br \/>\n__slab_<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-29097","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/29097","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=29097"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=29097"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=29097"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}