{"id":"CVE-2026-139378","summary":"Bluetooth: hci_sync: Serialize devcoredump reset during device open","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nBluetooth: hci_sync: Serialize devcoredump reset during device open\n\nAn ACTIVE devcoredump's buffer cursors must remain valid from the\npacket handler's state check through its copy. hci_devcd_rx() holds\nhdev-\u003elock across that interval, and hci_devcd_reset() requires the\nsame lock. However, hci_dev_open_sync() invokes reset without taking\nit.\n\nA registered VHCI controller can collect a dump through its debugfs\ninterface while the controller is down. If a successful open overlaps\nwith handling a nonempty dump packet, reset can run after the receiver's\nACTIVE check and before its copy:\n\n  hci_devcd_rx()                    hci_dev_open_sync()\n    dequeue nonempty skb\n    hci_dev_lock(hdev)\n    handler observes ACTIVE\n                                     hdev-\u003eopen(hdev) succeeds\n                                     hci_devcd_reset(hdev)\n                                       dump.tail = NULL\n                                       dump.state = IDLE\n    hci_devcd_copy()\n      compare against old dump.end\n      memcpy(NULL, ..., skb-\u003elen)\n    hci_dev_unlock(hdev)\n\nReset leaves dump.end pointing at the old buffer and purges only queued\npackets, so it cannot discard the skb already dequeued by the receiver.\nThe bounds check can pass with a NULL tail, leading to a nonempty copy\nto address zero. KASAN reported a 24-byte NULL write in hci_devcd_rx().\n\nTake hdev-\u003elock around the open-time reset. The receiver then finishes\nits state check and copy using valid cursors before reset, or observes\nIDLE after reset and skips the copy.\n\nKASAN report as below:\n\n    BUG: KASAN: null-ptr-deref in hci_devcd_rx+0x5d5/0x1a80\n    Write of size 24 at addr 0000000000000000 by task kworker/u17:0/496\n\n        CPU: 0 UID: 0 PID: 496 Comm: kworker/u17:0 Not tainted\n    7.2.0-rc6-pmb-bt-functional-v1+ #1 PREEMPT(lazy)\n        Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps\n    fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014\n    Workqueue: hci0 hci_devcd_rx\n    Call Trace:\n     \u003cTASK\u003e\n     dump_stack_lvl+0x93/0xd0\n     kasan_report+0xe0/0x110\n     ? hci_devcd_rx+0x5d5/0x1a80\n     kasan_check_range+0x105/0x1b0\n     __asan_memcpy+0x3c/0x60\n     hci_devcd_rx+0x5d5/0x1a80\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? __pfx_hci_devcd_rx+0x10/0x10\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? lock_release+0xc8/0x280\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     process_one_work+0x908/0x19c0\n     ? __pfx_process_one_work+0x10/0x10\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? lock_is_held_type+0x8f/0x100\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     worker_thread+0x65c/0xe40\n     ? __pfx_worker_thread+0x10/0x10\n     kthread+0x34f/0x460\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? __pfx_kthread+0x10/0x10\n     ret_from_fork+0x659/0x940\n     ? __pfx_ret_from_fork+0x10/0x10\n     ? srso_alias_return_thunk+0x5/0xfbef5\n     ? __switch_to+0x74f/0xf80\n     ? __pfx_kthread+0x10/0x10\n     ret_from_fork_asm+0x1a/0x30\n     \u003c/TASK\u003e\n    ==================================================================\n    Disabling lock debugging due to kernel taint","modified":"2026-11-30T15:02:28.080938247Z","published":"2026-11-30T13:34:12.194Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139378.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/03dce75459e06842832ea1670a3b3c46e5b65de4"},{"type":"WEB","url":"https://git.kernel.org/stable/c/265f3540b37a9452dce4fba99406c763fb7730c0"},{"type":"WEB","url":"https://git.kernel.org/stable/c/3973e025ed583096894a0c98c3d4cf28018b7cc2"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6d91353f6dbcc5c4fbb47bbd0c7f885453cfc939"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a5fabcd656b2ae6f625f512b1207b979488886fc"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b782fe3f409eaaa22fcb6c87b2f86f2b417e94b1"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139378.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139378"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"deb8156ebe5cb63a5988e7f86cc46aa062527c2b"},{"fixed":"265f3540b37a9452dce4fba99406c763fb7730c0"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"9695ef876fd122cb7bbc04a4a93b8727d2e36bda"},{"fixed":"a5fabcd656b2ae6f625f512b1207b979488886fc"},{"fixed":"03dce75459e06842832ea1670a3b3c46e5b65de4"},{"fixed":"b782fe3f409eaaa22fcb6c87b2f86f2b417e94b1"},{"fixed":"3973e025ed583096894a0c98c3d4cf28018b7cc2"},{"fixed":"6d91353f6dbcc5c4fbb47bbd0c7f885453cfc939"}]}],"versions":["v6.1.192","v6.1.191","v6.1.190","v6.1.189","v6.1.188"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139378.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.1.188"},{"fixed":"6.1.193"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.4.0"},{"fixed":"6.6.163"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.119"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.65"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.6"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139378.json"}}],"schema_version":"1.9.2"}