CVE-2026-143313: Bluetooth: hci_core: Keep link-key filtering inside RCU
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: hcicore: Keep link-key filtering inside RCU
hcifindlinkkey() must keep the matching link key allocated while it checks the key against the blocked-key list. It currently leaves the key-list RCU read-side section before passing k->val to hciisblockedkey(). That helper's own RCU section protects the blocked-key list, but it cannot keep an unlinked link key from being reclaimed.
The SMP receive path calls the finder without hdev->lock: Secure Connections key distribution over BR/EDR reaches it through smpdistributekeys() and scgenerateltk(). With a stored peer link key and a link-key entry in the blocked-key list, MGMTOPLOADLINKKEYS can free the selected key before the comparison:
HCI RX worker (SMP) Management / RCU reclamation hcifindlinkkey() rcureadlock() select k rcureadunlock() loadlinkkeys() hcidevlock(hdev) hcilinkkeysclear(hdev) listdelrcu(), kfreercu() hcidevunlock(hdev) grace period ends, k is freed hciisblockedkey(hdev, ..., k->val) memcmp() reads the freed key
Keep the RCU read-side section active through the blocked-key comparison and the warning that prints k->bdaddr, and release it before returning on both matched-key paths. hcifindltk() already handles its blocked-key check this way.
KASAN reported this on a test kernel whose scheduling hook paused the receive worker after the lookup until the key had been freed.
KASAN report as below:
================================================================== BUG: KASAN: slab-use-after-free in hciisblockedkey+0x2db/0x300 Read of size 1 at addr ffff88810b5f89a7 by task kworker/u17:0/502
CPU: 1 UID: 0 PID: 502 Comm: kworker/u17:0 Not tainted 7.2.0-rc6-pmb-bt-functional-v1+ #5 PREEMPT(lazy) Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, archcaps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Workqueue: hci1 hcirxwork Call Trace: <TASK> dumpstacklvl+0x93/0xd0 printreport+0xce/0x630 ? hciisblockedkey+0x2db/0x300 ? srsoaliasreturnthunk+0x5/0xfbef5 ? virtaddrvalid+0x20d/0x410 ? hciisblockedkey+0x2db/0x300 kasanreport+0xe0/0x110 ? hciisblockedkey+0x2db/0x300 hciisblockedkey+0x2db/0x300 hcifindlinkkey+0x12e/0x400 smpdistributekeys+0x1830/0x2950 ? tracehardirqson+0x18/0x160 ? srsoaliasreturnthunk+0x5/0xfbef5 ? queuedelayedworkon+0xb3/0xf0 ? pfxsmpdistributekeys+0x10/0x10 ? pfxsmpsendcmd.isra.0+0x10/0x10 ? cancelwork+0x1b0/0x290 ? entrytextend+0x1020f7/0x1020f9 ? lockdephardirqsonprepare+0xea/0x1a0 ? srsoaliasreturnthunk+0x5/0xfbef5 ? asanmemset+0x23/0x50 ? smprecvcb+0x12c7/0x8d80 ? srsoaliasreturnthunk+0x5/0xfbef5 smprecvcb+0x12c7/0x8d80 ? pfxsmprecvcb+0x10/0x10 ? pfxmightresched+0x10/0x10 ? srsoaliasreturnthunk+0x5/0xfbef5 ? stackdepotsaveflags+0x29/0x9a0 ? srsoaliasreturnthunk+0x5/0xfbef5 ? mutexlock+0x182c/0x2590 ? kasansavestack+0x42/0x60 ? l2caprecvframe+0x9ef/0x8830 ? kasanslabfree+0x5f/0x80 ? kmemcachefree+0x242/0x580 ? kfreeskbmem+0x15e/0x1d0 ? skskbreasondrop+0x12f/0x490 ? hcieventpacket+0x556/0xc70 ? hcirxwork+0x367/0xf00 ? processonework+0x908/0x19c0 ? workerthread+0x65c/0xe40 ? pfxmutexlock+0x10/0x10 ? lockacquire+0x466/0x2260 ? pfxl2capchanholdunlesszero+0x10/0x10 ? l2caprecvframe+0x13cc/0x8830 ? pfxsmprecvcb+0x10/0x10 l2caprecvframe+0x13cc/0x8830 ? srsoa ---truncated---
Affected Software
Event History
Frequently Asked Questions
Which systems are exposed to this race condition?
The affected path is Secure Connections key distribution over Bluetooth BR/EDR. It requires a stored peer link key and a corresponding entry in the blocked-key list.
What must occur for the use-after-free to be triggered?
The SMP receive path must be looking up a link key while MGMT_OP_LOAD_LINK_KEYS clears and replaces link keys. The management operation can unlink and schedule reclamation of the selected key before the blocked-key comparison reads it.
Is a Bluetooth connection alone sufficient to trigger the issue?
No. The described race also requires concurrent link-key loading through MGMT_OP_LOAD_LINK_KEYS, in addition to the relevant stored peer key and blocked-key-list entry.
How can I tell whether an environment has the triggering conditions?
Review whether the system uses BR/EDR Secure Connections key distribution, retains peer link keys, maintains blocked link-key entries, and invokes MGMT_OP_LOAD_LINK_KEYS while Bluetooth SMP traffic is being processed.