HIGH Introduced in 7.2
bluetooth L2CAP Channel Race
CVE-2026-99239
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI7.0HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: Bluetooth: L2CAP: refuse __l2cap_chan_add if chan already has conn l2cap_chan may be linked to l2cap_conn at most once. This is assumed in several places, eg l2cap_chan_del cleanup. There is a TOCTOU race where the invariant is violated: [Task 1] [Task 2] l2cap_chan_connect l2cap_sock_bind l2cap_chan_lock lock_sock l2cap_state_change if (sk->sk_state != BT_OPEN) chan->state = BT_CONNECT l2cap_sock_state_change_cb chan->state = BT_BOUND sk->sk_state = BT_BOUND lock_sock <------------------ release_sock sk->sk_state = BT_CONNECT l2cap_sock_connect() does not check sk->sk_state, so since chan->state is now BT_BOUND, subsequent connect() ends up with second __l2cap_chan_add. Explicitly document and check the invariant in __l2cap_chan_add with WARN_ON_ONCE. The only callsite where it could be hit is l2cap_chan_connect, so add pre-check there to avoid relying on chan->state. chan->state read/write is not properly guarded currently so there can be other TOCTOUC problems. Add l2cap_lock_chan in l2cap_sock_bind() to guard chan->state write.
02KernelScan AI Analysis
Risk summary
A local attacker with access to Bluetooth sockets can exploit a TOCTOU race between channel connect and socket bind operations to link an L2CAP channel to a connection twice. This violates a kernel invariant and leads to use-after-free during cleanup, enabling privilege escalation or kernel crash. Systems with Bluetooth enabled and accessible to untrusted local users or containers are at risk.
Vulnerability analysis
A race condition exists between the L2CAP channel connect path and the socket bind path. When one thread initiates a connection (setting channel state to BT_CONNECT) and another thread concurrently binds the socket (setting channel state to BT_BOUND), the connect path fails to re-check the socket state and proceeds to add the channel to a connection a second time. This double-add violates the invariant that a channel may be linked to at most one connection, causing use-after-free when the channel is later cleaned up. The fix adds explicit invariant checks in the channel-add function, a pre-check in the connect path, and proper locking around channel state writes in the bind path. The vulnerability is reachable by any local user who can create Bluetooth sockets — typically members of the bluetooth group or processes with CAP_NET_ADMIN — including unprivileged container workloads if Bluetooth is enabled.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 5.10.265 | 5.10.273 | 85cc289eb08a |
| 5.15 | 5.15.216 | 5.15.224 | 820579652b24 |
| 6.1 | 6.1.183 | 6.1.191 | e618d928ec7f |
| 6.12 | 6.12.97 | 6.12.115 | 52fe88e4ef87 |
| 6.18 | 6.18.39 | 6.18.60 | 10c705dd706a |
| 6.6 | 6.6.145 | 6.6.161 | fabaff1c59ff |
| 7.1 | 7.1.4 | 7.2 | 73820561d8cb |
| 7.2 | 7.2 | 7.2.14 | d3afd7803f9b |
| 7.3 | 7.2 | 7.3.1 | 86b55991d3cd |
| mainline | 7.2 | 7.4-rc1 | — |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Affected — no CIP fix yet (latest 6.12.114-cip34) |
| cip/6.1 | Affected — no CIP fix yet (latest 6.1.190-cip62) |
| cip/6.1-rt | Affected — no CIP fix yet (latest 6.1.189-cip61-rt32) |
| cip/5.10 | Affected — no CIP fix yet (latest 5.10.272-cip79) |
| cip/5.10-rt | Affected — no CIP fix yet (latest 5.10.272-cip79-rt35) |