CVE-2026-143311: Bluetooth: SMP: Protect LTK encryption with RCU
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: SMP: Protect LTK encryption with RCU
smpltkencrypt() checks the security level of the LTK returned by hcifindltk() and then starts encryption with its EDIV, Rand, value and key size. The finder ends its RCU read-side section before returning the borrowed entry, and neither caller holds hdev->lock: the SMP Security Request handler runs from the receive path, and setsockopt(BTSECURITY) reaches smpconnsecurity() with only the socket and channel locks held.
MGMTOPLOADLONGTERMKEYS can therefore free the LTK in between:
Socket security request Management / RCU reclamation smpltkencrypt() key = hcifindltk() loadlongtermkeys() hcidevlock(hdev) hcismpltksclear(hdev) listdelrcu(), kfreercu() hcidevunlock(hdev) grace period ends, key is freed smpltkseclevel(key) hcilestartenc(hcon, key->ediv, key->rand, key->val, ...)
Keep an RCU read-side section across the lookup and every use of the key. hcilestartenc() copies the key into the command and queues it with a GFPATOMIC allocation, so the whole sequence can stay inside the section.
KFENCE reported this on a test kernel where the socket thread was paused after the lookup until the RCU callback had freed the key.
KFENCE report as below:
================================================================== BUG: KFENCE: use-after-free read in smpltkencrypt.isra.0+0xf3/0x370
Use-after-free read at 0x00000000c45332eb (in kfence-#128): smpltkencrypt.isra.0+0xf3/0x370 smpconnsecurity+0x489/0x9d0 l2capsocksetsockopt+0x1bbe/0x2300 dosocksetsockopt+0x1fb/0x430 syssetsockopt+0x106/0x180 x64syssetsockopt+0xc2/0x160 dosyscall64+0x115/0x6a0 entrySYSCALL64afterhwframe+0x77/0x7f
kfence-#128: 0x00000000d45af9b0-0x0000000053c1365e, size=72, cache=kmalloc-96
allocated by task 533 on cpu 0 at 50.484258s (0.449177s ago): hciaddltk+0x1f5/0x3a0 loadlongtermkeys+0x6ea/0x930 hcisocksendmsg+0x128b/0x22e0 sockwriteiter+0x4c0/0x550 vfswrite+0x637/0x1010 ksyswrite+0x1b7/0x200 dosyscall64+0x115/0x6a0 entrySYSCALL64afterhwframe+0x77/0x7f
freed by task 0 on cpu 0 at 50.846944s (0.093664s ago): rcufreesheafprepare+0x261/0x2a0 rcufreesheafnobarn+0x1d/0x50 rcucore+0x661/0x1d10 handlesoftirqs+0x201/0x930 irqexitrcu+0x110/0x1e0 irqexitrcu+0xe/0x20 sysvecapictimerinterrupt+0x6c/0x80 asmsysvecapictimerinterrupt+0x1a/0x20 pvnativesafehalt+0xf/0x20 defaultidle+0x9/0x10 defaultidlecall+0x6c/0xb0 doidle+0x3a7/0x650 cpustartupentry+0x54/0x60 restinit+0x15e/0x2b0 startkernel+0x412/0x4b0 x8664startreservations+0x18/0x30 x8664startkernel+0x111/0x120 commonstartup64+0x13e/0x158
CPU: 2 UID: 0 PID: 534 Comm: l2cap-ltk-actor 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 ==================================================================
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.7
Event History
Frequently Asked Questions
What conditions are required to trigger this issue?
The race requires an LTK lookup and use during an SMP Security Request or a socket BT_SECURITY request, while MGMT_OP_LOAD_LONG_TERM_KEYS concurrently clears and replaces long-term keys. The key can be freed after lookup but before its security level or encryption parameters are used.
Which systems are exposed?
Linux kernel systems using Bluetooth SMP and long-term keys are relevant. Exposure depends on the affected security-request path or BT_SECURITY socket option being used while long-term keys are loaded through the management interface.
What should be done if the issue is suspected?
Apply the resolved upstream change referenced by the provided stable-kernel commits. The fix keeps the RCU read-side section active from the LTK lookup through all uses of the key, preventing reclamation during encryption setup.
How might this be detected during testing?
KFENCE reported the use-after-free on a test kernel. The failure involves a concurrent key reload and encryption-security request, so testing should exercise those operations concurrently.