KernelScan.io

HIGH Introduced in 7.2

bluetooth L2CAP Channel Race

CVE-2026-99239

CVSS 7.8 / 10.0 NVD

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

KernelScan AI7.0HIGH

01

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.

02

Engine v0.10.0

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.

Affectednet/bluetooth/l2cap_core.c, net/bluetooth/l2cap_sock.c (Bluetooth L2CAP subsystem)

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.

03

BranchIntroducedFixed inPatch commit
5.105.10.2655.10.27385cc289eb08a
5.155.15.2165.15.224820579652b24
6.16.1.1836.1.191e618d928ec7f
6.126.12.976.12.11552fe88e4ef87
6.186.18.396.18.6010c705dd706a
6.66.6.1456.6.161fabaff1c59ff
7.17.1.47.273820561d8cb
7.27.27.2.14d3afd7803f9b
7.37.27.3.186b55991d3cd
mainline7.27.4-rc1—
cip/6.127.26.12.117-cip3552fe88e4ef87

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.117-cip35
cip/6.1Affected — no CIP fix yet (latest 6.1.190-cip62)
cip/6.1-rtAffected — no CIP fix yet (latest 6.1.189-cip61-rt32)
cip/5.10Affected — no CIP fix yet (latest 5.10.272-cip79)
cip/5.10-rtAffected — no CIP fix yet (latest 5.10.272-cip79-rt35)