HIGH Introduced in 5.14
bluetooth MonitorReplay UAF
CVE-2026-99015
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
01Description
In the Linux kernel, the following vulnerability has been resolved: Bluetooth: hci_sock: Serialize dead-device detachment Rebinding an HCI socket after its controller is unregistered can race monitor control replay and crash the kernel. hci_sock_bind() clears hci_pi(sk)->hdev and drops the device reference under only the socket lock, whereas send_monitor_control_replay() holds hci_sk_list.lock for reading. Replay can observe a non-NULL hdev, then bind can clear it and drop the last reference before create_monitor_ctrl_open() reads hdev->id. This can cause a NULL pointer dereference if the pointer is reloaded, or a use-after-free if the old pointer is retained. The kernel reported: KASAN: null-ptr-deref in range [0x0000000000000068-0x000000000000006f] RIP: 0010:create_monitor_ctrl_open+0x579/0x800 Call Trace: hci_sock_bind+0xd96/0x1190 __sys_bind+0x166/0x200 __x64_sys_bind+0x6d/0xb0 do_syscall_64+0xdd/0x4a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f The same missing serialization lets hci_send_to_sock() select a socket for the old device and queue its frame after bind has detached the socket or installed a new binding. Take hci_sk_list.lock for writing when clearing the device pointer and resetting the socket state. This waits for existing replay and delivery readers to finish before detachment and prevents later readers from using the old binding. Keep hci_dev_put() outside the critical section because the final device release can sleep.
02KernelScan AI Analysis
Risk summary
A local attacker with CAP_NET_ADMIN (obtainable in a user namespace) can trigger a race condition between HCI socket rebinding and monitor control replay, leading to use-after-free or NULL pointer dereference. This allows kernel memory corruption, privilege escalation, and container escape on systems with Bluetooth enabled.
Vulnerability analysis
When a Bluetooth HCI controller is unregistered, rebinding its socket can race with the monitor control replay mechanism. The bind operation clears the socket's device pointer and drops the reference under only the socket lock, while the replay path reads the device pointer under a different lock (hci_sk_list.lock). This missing serialization allows the replay to observe a valid device pointer, then have it cleared and freed before the replay uses it, causing either a NULL pointer dereference or a use-after-free. The same gap also lets frame delivery select a socket for the already-detached device. The fix acquires hci_sk_list.lock for writing during detachment, ensuring all concurrent readers finish before the device pointer is cleared and preventing new readers from seeing the stale binding. The device reference is dropped outside the lock because the final release may sleep. An attacker needs local access and the ability to create and bind HCI sockets (CAP_NET_ADMIN, available in a user namespace), making this reachable from containers and unprivileged user namespaces on systems with Bluetooth support.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 4.14 | 4.14.244 | 4.15 | 37cef0c8fb53 |
| 4.19 | 4.19.203 | 4.20 | 76f2e2665697 |
| 4.4 | 4.4.281 | 4.5 | 304adbdb96b0 |
| 4.9 | 4.9.280 | 4.10 | 362126f73988 |
| 5.10 | 5.10.58 | 5.10.273 | 88f47e66b1a6 |
| 5.13 | 5.13.10 | 5.14 | e660a2240294 |
| 5.15 | 5.14 | 5.15.224 | 381a0925c556 |
| 5.4 | 5.4.140 | 5.5 | c3d279987790 |
| 6.1 | 5.14 | 6.1.191 | — |
| 6.12 | 5.14 | 6.12.113 | — |
| 6.18 | 5.14 | 6.18.57 | — |
| 6.6 | 5.14 | 6.6.160 | — |
| 7.2 | 5.14 | 7.2.11 | — |
| mainline | 5.14 | 7.3 | — |
| cip/6.12 | 5.14 | 6.12.114-cip34 | 76f2e2665697 |
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 | Fixed in 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) |
| cip/4.19 | Affected — no CIP fix yet (latest 4.19.325-cip136) |
| cip/4.19-rt | Affected — no CIP fix yet (latest 4.19.325-cip136-rt50) |
| cip/4.4 | Affected — no CIP fix yet (latest 4.4.302-cip115) |
| cip/4.4-rt | Affected — no CIP fix yet (latest 4.4.302-cip115-rt63) |