{"id":33353,"date":"2026-10-06T20:31:50","date_gmt":"2026-10-06T12:31:50","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-98284"},"modified":"2026-10-06T20:31:50","modified_gmt":"2026-10-06T12:31:50","slug":"cve-2026-98284","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-98284","title":{"rendered":"CVE-2026-98284 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nnetlink: do not free"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>netlink: do not free nlk-&gt;groups while lockless readers can use it<\/p>\n<p>netlink_realloc_groups() uses krealloc() under netlink_table_grab().<br \/>\nWhenever NLGRPSZ(groups) lands in a different kmalloc bucket, the old<br \/>\nbitmap is freed immediately.<\/p>\n<p>Two readers of nlk-&gt;groups \/ nlk-&gt;ngroups do not hold the netlink<br \/>\ntable lock:<\/p>\n<p>1) sk_diag_dump_groups(). Hashed (bound) sockets are dumped from the<br \/>\n   rhashtable walk in __netlink_diag_dump(), which only holds RCU.<br \/>\n   Only the mc_list part of the dump takes nl_table_lock.<\/p>\n<p>2) netlink_native_seq_show() (\/proc\/net\/netlink), whose walk has been<br \/>\n   lockless since commit 21e4902aea80 (&#8220;netlink: Lockless lookup with<br \/>\n   RCU grace period in socket release&#8221;).<\/p>\n<p>Both can read a freed buffer, and sk_diag_dump_groups() can also read<br \/>\npast the end of the old (smaller) buffer if it happens to load the old<br \/>\n@groups pointer together with the new @ngroups value, copying the<br \/>\nresult into a NETLINK_DIAG_GROUPS attribute.<\/p>\n<p>This is the same class of bug that commit f773608026ee (&#8220;netlink:<br \/>\naccess nlk groups safely in netlink bind and getname&#8221;) fixed for bind()<br \/>\nand getname(); these two readers were missed. Simply grabbing the table<br \/>\nlock in sk_diag_dump_groups() is not an option, because it is also<br \/>\ncalled with nl_table_lock already held from the mc_list section of the<br \/>\ndump.<\/p>\n<p>Make the lockless readers safe instead:<\/p>\n<p>&#8211; Allocate a new bitmap and free the old one after an RCU grace period,<br \/>\n  instead of relying on the implicit kfree() done by krealloc().<\/p>\n<p>&#8211; Publish @groups before @ngroups, both with release semantics, and have<br \/>\n  the lockless readers load @ngroups first. A reader can then never pair<br \/>\n  the new (bigger) size with the old (smaller) buffer, and a reader<br \/>\n  picking up the new pointer while still seeing the old size is<br \/>\n  guaranteed to see the initialized bitmap.<\/p>\n<p>netlink_realloc_groups() is called from process context (bind() and<br \/>\nsetsockopt()), so kfree_rcu_mightsleep() can be used, once the table<br \/>\nhas been released.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>netlink: do not free nlk-&gt;groups while lockless readers can use it<\/p>\n<p>netlink_realloc_groups() uses krealloc() under netlink_table_gr<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-33353","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/33353","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=33353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=33353"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=33353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}