AZL-118550: CVE-2026-143311 affecting package kernel 6.6.161.1-1
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.
- Compensating control
In Linux kernel Bluetooth SMP, keep an RCU read-side section active across the LTK lookup and every use of the returned key during encryption.
Event History
Frequently Asked Questions
What conditions are needed to trigger the use-after-free?
A Bluetooth SMP security operation must use a long-term key while a concurrent MGMT_OP_LOAD_LONG_TERM_KEYS operation clears and replaces long-term keys. The key must be freed after the lookup returns it but before the encryption path finishes reading it.
Which interfaces are involved in reaching the vulnerable code?
The affected path can be reached through a Bluetooth socket security request, including setsockopt(BT_SECURITY), or through the SMP Security Request receive path. The concurrent key replacement occurs through the Bluetooth management operation MGMT_OP_LOAD_LONG_TERM_KEYS.
How can this be mitigated if an update cannot be applied immediately?
The provided information identifies the race with MGMT_OP_LOAD_LONG_TERM_KEYS. Avoid loading or replacing Bluetooth long-term keys concurrently with Bluetooth SMP security and encryption operations.
What is the remediation described for this issue?
The fix keeps an RCU read-side section active from the long-term-key lookup through all uses of that key, including starting encryption. This prevents the key from being reclaimed while its security level, EDIV, random value, and key material are read.