{"id":17323,"date":"2026-09-05T02:30:59","date_gmt":"2026-09-04T18:30:59","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-80819"},"modified":"2026-09-05T02:30:59","modified_gmt":"2026-09-04T18:30:59","slug":"cve-2026-80819","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-80819","title":{"rendered":"CVE-2026-80819 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nBluetooth: RFCOMM: ta"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>Bluetooth: RFCOMM: take rfcomm_mutex for the deferred setup accept<\/p>\n<p>rfcomm_sock_recvmsg() completes a deferred setup by calling<br \/>\nrfcomm_dlc_accept() without holding any RFCOMM lock:<\/p>\n<p>\tif (test_and_clear_bit(RFCOMM_DEFER_SETUP, &amp;d-&gt;flags)) {<br \/>\n\t\trfcomm_dlc_accept(d);<br \/>\n\t\treturn 0;<br \/>\n\t}<\/p>\n<p>and rfcomm_dlc_accept() dereferences the session on its first line:<\/p>\n<p>\tstruct sock *sk = d-&gt;session-&gt;sock-&gt;sk;<\/p>\n<p>Every other path that touches d-&gt;session runs under rfcomm_mutex:<br \/>\nrfcomm_dlc_open(), rfcomm_dlc_close(), rfcomm_dlc_exists(),<br \/>\nrfcomm_dlc_send_rpn(), and the RFCOMM thread through<br \/>\nrfcomm_process_sessions(). rfcomm_connect_ind() is even documented as<br \/>\n&#8220;called under rfcomm_lock()&#8221;. This call site is the only one that skips<br \/>\nit.<\/p>\n<p>The RFCOMM_DEFER_SETUP bit looks like it serialises the accept against<br \/>\nteardown, since __rfcomm_dlc_close() returns early when it wins the<br \/>\ntest_and_clear. But rfcomm_recv_disc() forces the state first:<\/p>\n<p>\td-&gt;state = BT_CLOSED;<br \/>\n\t__rfcomm_dlc_close(d, err);<\/p>\n<p>and the early return only covers BT_CONNECT, BT_CONFIG, BT_OPEN and<br \/>\nBT_CONNECT2. With the state already BT_CLOSED that switch does not<br \/>\nmatch, the bit is never consulted, and __rfcomm_dlc_close() falls<br \/>\nthrough to rfcomm_dlc_unlink(), which sets d-&gt;session = NULL.<\/p>\n<p>So a remote DISC on a deferred dlc clears the session while leaving<br \/>\nRFCOMM_DEFER_SETUP set. The next recvmsg() then passes the<br \/>\ntest_and_clear and dereferences a NULL session. No timing window is<br \/>\nneeded: once the DISC has been processed, the dereference is<br \/>\nunconditional.<\/p>\n<p>Give rfcomm_dlc_accept() the same shape as rfcomm_dlc_open() and<br \/>\nrfcomm_dlc_close(): an exported wrapper that takes rfcomm_mutex and<br \/>\nre-checks the session, around a __rfcomm_dlc_accept() that the two<br \/>\nin-core callers, which already hold the mutex, keep using.<\/p>\n<p>Reproduced on a KASAN + PROVE_LOCKING kernel with a BR\/EDR peer emulated<br \/>\nover \/dev\/vhci: the peer brings up an ACL link, opens L2CAP on the<br \/>\nRFCOMM PSM, starts a session, opens a dlc on a channel bound with<br \/>\nBT_DEFER_SETUP, and sends DISC after the socket is accepted. recv() on<br \/>\nthe accepted socket then hits:<\/p>\n<p>  Oops: general protection fault<br \/>\n  KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]<br \/>\n  RIP: 0010:rfcomm_dlc_accept+0x54\/0x350<br \/>\n  Call Trace:<br \/>\n    rfcomm_sock_recvmsg+0x1cd\/0x230<br \/>\n    sock_recvmsg+0x166\/0x1c0<br \/>\n    __sys_recvfrom+0x20d\/0x300<\/p>\n<p>0x10 is the offset of sock in struct rfcomm_session. With this patch the<br \/>\nsame run completes with recv() returning 0 and no report, and lockdep<br \/>\nstays quiet, confirming rfcomm_mutex is still taken before lock_sock on<br \/>\nthis path as it is on the thread side.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>Bluetooth: RFCOMM: take rfcomm_mutex for the deferred setup accept<\/p>\n<p>rfcomm_sock_recvmsg() completes a deferred setup by calling<br \/>\nrfc<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-17323","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/17323","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=17323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=17323"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=17323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}