{"id":33345,"date":"2026-10-06T20:31:49","date_gmt":"2026-10-06T12:31:49","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-98276"},"modified":"2026-10-06T20:31:49","modified_gmt":"2026-10-06T12:31:49","slug":"cve-2026-98276","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-98276","title":{"rendered":"CVE-2026-98276 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nnet: lock the socket"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>net: lock the socket in sock_gettstamp()<\/p>\n<p>sk-&gt;sk_flags must only be changed while holding the socket lock,<br \/>\nbecause sock_set_flag() and sock_reset_flag() use non atomic<br \/>\noperations (__set_bit() and __clear_bit()).<\/p>\n<p>sock_gettstamp() is one of the last places where a bit of sk-&gt;sk_flags<br \/>\nis changed from a syscall without owning the socket lock, through<br \/>\nsock_enable_timestamp(sk, SOCK_TIMESTAMP).<\/p>\n<p>sk_set_memalloc() and sk_clear_memalloc() also change sk-&gt;sk_flags<br \/>\nwithout the socket lock, but their callers (nbd, iscsi_tcp, nvme-tcp,<br \/>\nsunrpc, wireguard) need a careful audit, this will be addressed in a<br \/>\nseparate patch.<\/p>\n<p>Jungwoo Lee and Wongi Lee reported an UDP socket use-after-free<br \/>\ncaused by this bug: a SIOCGSTAMPNS_NEW ioctl racing with bind()<br \/>\ncan cancel the SOCK_RCU_FREE bit that udp_lib_get_port() just set,<br \/>\nbecause both threads perform a read-modify-write on the same word.<\/p>\n<p>  CPU 0 (bind)                        CPU 1 (SIOCGSTAMPNS_NEW)<br \/>\n  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;    &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\n  read sk_flags = F                   read sk_flags = F<br \/>\n  compute F | BIT(SOCK_RCU_FREE)      compute F | BIT(SOCK_TIMESTAMP)<br \/>\n  store F | BIT(SOCK_RCU_FREE)<br \/>\n  sk_add_node_rcu(sk, &#8230;)<br \/>\n                                      store F | BIT(SOCK_TIMESTAMP)<\/p>\n<p>After the lost update, SOCK_RCU_FREE is clear while the socket is<br \/>\nvisible to lockless UDP receive lookups. sk_destruct() then frees<br \/>\nthe socket immediately instead of waiting for a RCU grace period,<br \/>\nwhile the receive path still holds a reference-less pointer to it:<\/p>\n<p> BUG: KASAN: slab-use-after-free in ipv4_pktinfo_prepare+0x30\/0x410<br \/>\n Read of size 8 at addr ffff888008806610 by task exploit\/207<br \/>\n CPU: 0 UID: 1000 PID: 207 Comm: exploit Not tainted 6.12.95+ #1<br \/>\n  ipv4_pktinfo_prepare+0x30\/0x410<br \/>\n  udp_queue_rcv_one_skb+0x51c\/0x1180<br \/>\n  udp_unicast_rcv_skb+0x109\/0x350<br \/>\n  ip_protocol_deliver_rcu+0x14b\/0x310<br \/>\n  ip_local_deliver_finish+0x29d\/0x390<br \/>\n  ip_local_deliver+0x24d\/0x2a0<\/p>\n<p>Only grab the socket lock when SOCK_TIMESTAMP has to be set,<br \/>\nto keep the common case lockless.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>net: lock the socket in sock_gettstamp()<\/p>\n<p>sk-&gt;sk_flags must only be changed while holding the socket lock,<br \/>\nbecause sock_set_flag() <\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-33345","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/33345","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=33345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=33345"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=33345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}