{"id":40927,"date":"2026-10-19T00:31:35","date_gmt":"2026-10-18T16:31:35","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-98455"},"modified":"2026-10-19T00:31:35","modified_gmt":"2026-10-18T16:31:35","slug":"cve-2026-98455","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-98455","title":{"rendered":"CVE-2026-98455 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nBluetooth: RFCOMM: fi"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>Bluetooth: RFCOMM: fix NULL dereference of dlc-&gt;session in RFCOMM_CONNINFO<\/p>\n<p>The RFCOMM_CONNINFO getsockopt handler accepts a socket that is not<br \/>\nconnected as long as deferred setup is enabled:<\/p>\n<p>\tif (sk-&gt;sk_state != BT_CONNECTED &amp;&amp;<br \/>\n\t\t\t\t!rfcomm_pi(sk)-&gt;dlc-&gt;defer_setup) {<br \/>\n\t\terr = -ENOTCONN;<br \/>\n\t\tbreak;<br \/>\n\t}<br \/>\n\tl2cap_sk = rfcomm_pi(sk)-&gt;dlc-&gt;session-&gt;sock-&gt;sk;<\/p>\n<p>dlc-&gt;defer_setup is set in rfcomm_sock_init() when rfcomm_connect_ind()<br \/>\ncreates a child socket for an incoming connection on a listening socket<br \/>\nthat has BT_DEFER_SETUP enabled. It is never cleared afterwards. The<br \/>\nsession, however, can go away underneath it.<\/p>\n<p>rfcomm_recv_disc() forces the dlc state before tearing it down:<\/p>\n<p>\td-&gt;state = BT_CLOSED;<br \/>\n\t__rfcomm_dlc_close(d, err);<\/p>\n<p>The RFCOMM_DEFER_SETUP early return in __rfcomm_dlc_close() only covers<br \/>\nBT_CONNECT, BT_CONFIG, BT_OPEN and BT_CONNECT2, so with the state<br \/>\nalready BT_CLOSED that switch does not match and the function falls<br \/>\nthrough to rfcomm_dlc_unlink(), which sets d-&gt;session = NULL, while<br \/>\nd-&gt;defer_setup stays 1.<\/p>\n<p>A getsockopt(SOL_RFCOMM, RFCOMM_CONNINFO) on the accepted socket after<br \/>\nthat point therefore skips the -ENOTCONN path &#8212; sk-&gt;sk_state is<br \/>\nBT_CLOSED, but dlc-&gt;defer_setup is still set &#8212; and dereferences the<br \/>\nNULL session. No race is needed: once the DISC has been processed, the<br \/>\ndereference is unconditional.<\/p>\n<p>Reproduced on a KASAN kernel under QEMU with a BR\/EDR peer emulated over<br \/>\n\/dev\/vhci: the peer brings up an ACL link, opens L2CAP on the RFCOMM<br \/>\nPSM, starts a session and sends SABM for a channel bound with<br \/>\nBT_DEFER_SETUP, and sends DISC for that dlci after the socket has been<br \/>\naccepted. getsockopt(SOL_RFCOMM, RFCOMM_CONNINFO) on the accepted<br \/>\nsocket then hits:<\/p>\n<p> Oops: general protection fault, probably for non-canonical address<br \/>\n 0xdffffc0000000002: 0000 [#1] SMP KASAN PTI<br \/>\n KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]<br \/>\n CPU: 1 UID: 0 PID: 150 Comm: init Tainted: G B 7.3.0-rc3-g5dd1818b15d9<br \/>\n Hardware name: QEMU Standard PC (i440FX + PIIX, 1996)<br \/>\n RIP: 0010:rfcomm_sock_getsockopt+0x529\/0x780<br \/>\n Call Trace:<\/p>\n<p>  do_sock_getsockopt+0x3ad\/0x7d0<br \/>\n  __sys_getsockopt+0x10e\/0x1b0<br \/>\n  __x64_sys_getsockopt+0xc2\/0x160<br \/>\n  do_syscall_64+0xda\/0x4b0<br \/>\n  entry_SYSCALL_64_after_hwframe+0x77\/0x7f<\/p>\n<p>0x10 is the offset of sock in struct rfcomm_session;<br \/>\nrfcomm_sock_getsockopt_old() is inlined into rfcomm_sock_getsockopt().<\/p>\n<p>Commit 43a556b2fd43 (&#8220;Bluetooth: RFCOMM: take rfcomm_mutex for the<br \/>\ndeferred setup accept&#8221;) fixed the same &#8220;a remote DISC clears the session<br \/>\nwhile deferred setup is still flagged&#8221; problem in rfcomm_dlc_accept();<br \/>\nthis is the remaining instance of it, in the getsockopt path.<\/p>\n<p>Deferred setup only leaves a socket usable here once it has reached<br \/>\nBT_CONNECT2, so restrict the exception to that state and check that a<br \/>\nsession is actually present before following it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>Bluetooth: RFCOMM: fix NULL dereference of dlc-&gt;session in RFCOMM_CONNINFO<\/p>\n<p>The RFCOMM_CONNINFO getsockopt handler accepts a socket<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-40927","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/40927","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=40927"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=40927"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=40927"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}