KernelScan.io

HIGH

bluetooth L2CAP AcceptQueue UAF

CVE-2026-90092

CVSS 8.0 / 10.0 NVD

CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI7.5HIGH

01

In the Linux kernel, the following vulnerability has been resolved: Bluetooth: L2CAP: reject accept queue add unless BT_LISTEN New sk should not be added to parent socket accept queue after last l2cap_sock_cleanup_listen() has run in l2cap_sock_teardown_cb() and state set to BT_CLOSED, as that can result to UAF on dereferencing the dangling parent reference. l2cap_sock_new_connection_cb() may race with parent l2cap_chan teardown, due to chan->state accessed without consistent locking: [Task 1] [Task 2] l2cap_sock_release(parent) l2cap_connect l2cap_sock_shutdown pchan = l2cap_global_chan_by_psm l2cap_chan_lock(pchan) l2cap_chan_close l2cap_sock_teardown_cb pchan->state = BT_CLOSED l2cap_chan_unlock(pchan) ------> l2cap_chan_lock(pchan) l2cap_new_connection l2cap_sock_new_connection_cb l2cap_chan_lock(pchan) <-------- l2cap_chan_unlock(pchan) l2cap_sock_kill(parent) /* bt_sk(sk)->parent dangling */ Fix by adding check for sk_state == BT_LISTEN after acquiring sk lock in l2cap_sock_new_connection_cb(). Add lock_sock() around sk_state writes where missing, to avoid data races. Although the data races on pchan->state should be fixed too, this defensive sk_state check probably makes sense in any case.

02

Engine v0.6.0

Risk summary

A race condition in the Bluetooth L2CAP socket layer allows an incoming connection to be added to a listening socket's accept queue after that socket has already been torn down and freed. This results in a use-after-free when the child socket dereferences its dangling parent pointer. An attacker within Bluetooth range can trigger this by sending a connection request that races with the local application closing the listening socket, potentially achieving kernel memory corruption.

Affectednet/bluetooth/l2cap_sock.c (Bluetooth L2CAP)

Vulnerability analysis

When a listening L2CAP socket is closed by a local application, its teardown path marks the socket as closed and cleans up the accept queue. Because of a race in how the underlying channel state is protected, an incoming Bluetooth connection that arrives after teardown starts but before the socket is fully destroyed can still be processed, creating a child socket that points to the parent which is about to be freed. After the parent is freed, that child holds a dangling reference, leading to use-after-free corruption in kernel memory. The fix adds a check that rejects new connections unless the parent is still listening, and adds missing locking around state changes in other paths to close the race. This can be reached by any Bluetooth device in range that sends a connection request timed to race with the local application closing its listening socket; no account or privileges on the target are needed, only that Bluetooth is enabled and an L2CAP listener is present.

03

BranchIntroducedFixed inPatch commit
5.105.10.2585.11c47339e169bf
5.155.15.2095.16d4bfa78fd679
6.16.1.1756.1.188bf61a65c6093
6.126.12.886.12.1102a3a27aaf19b
6.186.18.306.18.5287276dc15b55
6.66.6.1406.6.157491e4c600179
7.07.0.77.1—
7.2—7.2.6—
mainline—7.3—
cip/6.1—6.1.189-cip61bf61a65c6093
cip/6.1-rt—6.1.189-cip61-rt32bf61a65c6093
cip/6.12—6.12.111-cip322a3a27aaf19b

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.111-cip32
cip/6.1Fixed in 6.1.189-cip61
cip/6.1-rtFixed in 6.1.189-cip61-rt32
cip/5.10Affected — no CIP fix yet (latest 5.10.271-cip78)
cip/5.10-rtAffected — no CIP fix yet (latest 5.10.268-cip77-rt34)