{"id":"CVE-2026-143311","state":"PUBLISHED","title":"Bluetooth: SMP: Protect LTK encryption with RCU","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nBluetooth: SMP: Protect LTK encryption with RCU\n\nsmp_ltk_encrypt() checks the security level of the LTK returned by\nhci_find_ltk() and then starts encryption with its EDIV, Rand, value\nand key size. The finder ends its RCU read-side section before\nreturning the borrowed entry, and neither caller holds hdev->lock: the\nSMP Security Request handler runs from the receive path, and\nsetsockopt(BT_SECURITY) reaches smp_conn_security() with only the\nsocket and channel locks held.\n\nMGMT_OP_LOAD_LONG_TERM_KEYS can therefore free the LTK in between:\n\n  Socket security request          Management / RCU reclamation\n  smp_ltk_encrypt()\n    key = hci_find_ltk()\n                                   load_long_term_keys()\n                                     hci_dev_lock(hdev)\n                                     hci_smp_ltks_clear(hdev)\n                                       list_del_rcu(), kfree_rcu()\n                                     hci_dev_unlock(hdev)\n                                   grace period ends, key is freed\n    smp_ltk_sec_level(key)\n    hci_le_start_enc(hcon, key->ediv, key->rand, key->val, ...)\n\nKeep an RCU read-side section across the lookup and every use of the\nkey. hci_le_start_enc() copies the key into the command and queues it\nwith a GFP_ATOMIC allocation, so the whole sequence can stay inside the\nsection.\n\nKFENCE reported this on a test kernel where the socket thread was\npaused after the lookup until the RCU callback had freed the key.\n\nKFENCE report as below:\n\n    ==================================================================\n    BUG: KFENCE: use-after-free read in smp_ltk_encrypt.isra.0+0xf3/0x370\n\n    Use-after-free read at 0x00000000c45332eb (in kfence-#128):\n     smp_ltk_encrypt.isra.0+0xf3/0x370\n     smp_conn_security+0x489/0x9d0\n     l2cap_sock_setsockopt+0x1bbe/0x2300\n     do_sock_setsockopt+0x1fb/0x430\n     __sys_setsockopt+0x106/0x180\n     __x64_sys_setsockopt+0xc2/0x160\n     do_syscall_64+0x115/0x6a0\n     entry_SYSCALL_64_after_hwframe+0x77/0x7f\n\n    kfence-#128: 0x00000000d45af9b0-0x0000000053c1365e, size=72, cache=kmalloc-96\n\n    allocated by task 533 on cpu 0 at 50.484258s (0.449177s ago):\n     hci_add_ltk+0x1f5/0x3a0\n     load_long_term_keys+0x6ea/0x930\n     hci_sock_sendmsg+0x128b/0x22e0\n     sock_write_iter+0x4c0/0x550\n     vfs_write+0x637/0x1010\n     ksys_write+0x1b7/0x200\n     do_syscall_64+0x115/0x6a0\n     entry_SYSCALL_64_after_hwframe+0x77/0x7f\n\n    freed by task 0 on cpu 0 at 50.846944s (0.093664s ago):\n     __rcu_free_sheaf_prepare+0x261/0x2a0\n     rcu_free_sheaf_nobarn+0x1d/0x50\n     rcu_core+0x661/0x1d10\n     handle_softirqs+0x201/0x930\n     __irq_exit_rcu+0x110/0x1e0\n     irq_exit_rcu+0xe/0x20\n     sysvec_apic_timer_interrupt+0x6c/0x80\n     asm_sysvec_apic_timer_interrupt+0x1a/0x20\n     pv_native_safe_halt+0xf/0x20\n     default_idle+0x9/0x10\n     default_idle_call+0x6c/0xb0\n     do_idle+0x3a7/0x650\n     cpu_startup_entry+0x54/0x60\n     rest_init+0x15e/0x2b0\n     start_kernel+0x412/0x4b0\n     x86_64_start_reservations+0x18/0x30\n     x86_64_start_kernel+0x111/0x120\n     common_startup_64+0x13e/0x158\n\n    CPU: 2 UID: 0 PID: 534 Comm: l2cap-ltk-actor Not tainted 7.2.0-rc6-pmb-bt-functional-v1+ #5 PREEMPT(lazy)\n    Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014\n    ==================================================================","publishedAt":"2026-12-03T09:21:39.485Z","updatedAt":"2026-12-03T09:21:39.485Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"988c5997d32052a58bd0127710bc8e2c8c5665b1","status":"affected","lessThan":"82e4991c747bf17247795d579a768e29b9d623f0","versionType":"git"},{"version":"988c5997d32052a58bd0127710bc8e2c8c5665b1","status":"affected","lessThan":"add463a65802bb117e4a17b8c00d747fa70399fc","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/bluetooth/smp.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.2","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.2","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/bluetooth/smp.c"]}],"references":["https://git.kernel.org/stable/c/82e4991c747bf17247795d579a768e29b9d623f0","https://git.kernel.org/stable/c/add463a65802bb117e4a17b8c00d747fa70399fc"],"weaknesses":[],"ingestedAt":"2026-12-03T09:44:04.436Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/143xxx/CVE-2026-143311.json","commit":"9e309c7c0f08856e2558a1df33f75dca027fab70","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-143311","state":"PUBLISHED","datePublished":"2026-12-03T09:21:39.485Z","dateUpdated":"2026-12-03T09:21:39.485Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-12-03T03:10:28.366Z"},"containers":{"cna":{"title":"Bluetooth: SMP: Protect LTK encryption with RCU","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nBluetooth: SMP: Protect LTK encryption with RCU\n\nsmp_ltk_encrypt() checks the security level of the LTK returned by\nhci_find_ltk() and then starts encryption with its EDIV, Rand, value\nand key size. The finder ends its RCU read-side section before\nreturning the borrowed entry, and neither caller holds hdev->lock: the\nSMP Security Request handler runs from the receive path, and\nsetsockopt(BT_SECURITY) reaches smp_conn_security() with only the\nsocket and channel locks held.\n\nMGMT_OP_LOAD_LONG_TERM_KEYS can therefore free the LTK in between:\n\n  Socket security request          Management / RCU reclamation\n  smp_ltk_encrypt()\n    key = hci_find_ltk()\n                                   load_long_term_keys()\n                                     hci_dev_lock(hdev)\n                                     hci_smp_ltks_clear(hdev)\n                                       list_del_rcu(), kfree_rcu()\n                                     hci_dev_unlock(hdev)\n                                   grace period ends, key is freed\n    smp_ltk_sec_level(key)\n    hci_le_start_enc(hcon, key->ediv, key->rand, key->val, ...)\n\nKeep an RCU read-side section across the lookup and every use of the\nkey. hci_le_start_enc() copies the key into the command and queues it\nwith a GFP_ATOMIC allocation, so the whole sequence can stay inside the\nsection.\n\nKFENCE reported this on a test kernel where the socket thread was\npaused after the lookup until the RCU callback had freed the key.\n\nKFENCE report as below:\n\n    ==================================================================\n    BUG: KFENCE: use-after-free read in smp_ltk_encrypt.isra.0+0xf3/0x370\n\n    Use-after-free read at 0x00000000c45332eb (in kfence-#128):\n     smp_ltk_encrypt.isra.0+0xf3/0x370\n     smp_conn_security+0x489/0x9d0\n     l2cap_sock_setsockopt+0x1bbe/0x2300\n     do_sock_setsockopt+0x1fb/0x430\n     __sys_setsockopt+0x106/0x180\n     __x64_sys_setsockopt+0xc2/0x160\n     do_syscall_64+0x115/0x6a0\n     entry_SYSCALL_64_after_hwframe+0x77/0x7f\n\n    kfence-#128: 0x00000000d45af9b0-0x0000000053c1365e, size=72, cache=kmalloc-96\n\n    allocated by task 533 on cpu 0 at 50.484258s (0.449177s ago):\n     hci_add_ltk+0x1f5/0x3a0\n     load_long_term_keys+0x6ea/0x930\n     hci_sock_sendmsg+0x128b/0x22e0\n     sock_write_iter+0x4c0/0x550\n     vfs_write+0x637/0x1010\n     ksys_write+0x1b7/0x200\n     do_syscall_64+0x115/0x6a0\n     entry_SYSCALL_64_after_hwframe+0x77/0x7f\n\n    freed by task 0 on cpu 0 at 50.846944s (0.093664s ago):\n     __rcu_free_sheaf_prepare+0x261/0x2a0\n     rcu_free_sheaf_nobarn+0x1d/0x50\n     rcu_core+0x661/0x1d10\n     handle_softirqs+0x201/0x930\n     __irq_exit_rcu+0x110/0x1e0\n     irq_exit_rcu+0xe/0x20\n     sysvec_apic_timer_interrupt+0x6c/0x80\n     asm_sysvec_apic_timer_interrupt+0x1a/0x20\n     pv_native_safe_halt+0xf/0x20\n     default_idle+0x9/0x10\n     default_idle_call+0x6c/0xb0\n     do_idle+0x3a7/0x650\n     cpu_startup_entry+0x54/0x60\n     rest_init+0x15e/0x2b0\n     start_kernel+0x412/0x4b0\n     x86_64_start_reservations+0x18/0x30\n     x86_64_start_kernel+0x111/0x120\n     common_startup_64+0x13e/0x158\n\n    CPU: 2 UID: 0 PID: 534 Comm: l2cap-ltk-actor Not tainted 7.2.0-rc6-pmb-bt-functional-v1+ #5 PREEMPT(lazy)\n    Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014\n    =================================================================="}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"988c5997d32052a58bd0127710bc8e2c8c5665b1","status":"affected","lessThan":"82e4991c747bf17247795d579a768e29b9d623f0","versionType":"git"},{"version":"988c5997d32052a58bd0127710bc8e2c8c5665b1","status":"affected","lessThan":"add463a65802bb117e4a17b8c00d747fa70399fc","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/bluetooth/smp.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.2","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.2","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/bluetooth/smp.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/82e4991c747bf17247795d579a768e29b9d623f0"},{"url":"https://git.kernel.org/stable/c/add463a65802bb117e4a17b8c00d747fa70399fc"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-12-03T09:21:39.485Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.2","versionEndExcluding":"7.3.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.2","versionEndExcluding":"7.4-rc2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}