# CVE-2022-50166: Bluetooth: When HCI work queue is drained, only queue chained work

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.19%, higher than 9% of CVEs (2026-12-01)
- Published: 2025-06-18T11:03:20.323Z
- Modified: 2026-11-05T20:17:25.853Z
- Weaknesses: CWE-667
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

Bluetooth: When HCI work queue is drained, only queue chained work

The HCI command, event, and data packet processing workqueue is drained
to avoid deadlock in commit
76727c02c1e1 ("Bluetooth: Call drain_workqueue() before resetting state").

There is another delayed work, which will queue command to this drained
workqueue. Which results in the following error report:

Bluetooth: hci2: command 0x040f tx timeout
WARNING: CPU: 1 PID: 18374 at kernel/workqueue.c:1438 __queue_work+0xdad/0x1140
Workqueue: events hci_cmd_timeout
RIP: 0010:__queue_work+0xdad/0x1140
RSP: 0000:ffffc90002cffc60 EFLAGS: 00010093
RAX: 0000000000000000 RBX: ffff8880b9d3ec00 RCX: 0000000000000000
RDX: ffff888024ba0000 RSI: ffffffff814e048d RDI: ffff8880b9d3ec08
RBP: 0000000000000008 R08: 0000000000000000 R09: 00000000b9d39700
R10: ffffffff814f73c6 R11: 0000000000000000 R12: ffff88807cce4c60
R13: 0000000000000000 R14: ffff8880796d8800 R15: ffff8880796d8800
FS:  0000000000000000(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000c0174b4000 CR3: 000000007cae9000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 ? queue_work_on+0xcb/0x110
 ? lockdep_hardirqs_off+0x90/0xd0
 queue_work_on+0xee/0x110
 process_one_work+0x996/0x1610
 ? pwq_dec_nr_in_flight+0x2a0/0x2a0
 ? rwlock_bug.part.0+0x90/0x90
 ? _raw_spin_lock_irq+0x41/0x50
 worker_thread+0x665/0x1080
 ? process_one_work+0x1610/0x1610
 kthread+0x2e9/0x3a0
 ? kthread_complete_and_exit+0x40/0x40
 ret_from_fork+0x1f/0x30
 </TASK>

To fix this, we can add a new HCI_DRAIN_WQ flag, and don't queue the
timeout workqueue while command workqueue is draining.

(As written by CVE List.)

## Affected

- Linux Linux: from 76727c02c1e14a2b561b806fa1d08acc1619ad27 before 4bf367fa1fefabdf14938d0ac9ed60020389112e; from 76727c02c1e14a2b561b806fa1d08acc1619ad27 before 3b382555706558f5c0587862b6dc03e96a252bba; from 76727c02c1e14a2b561b806fa1d08acc1619ad27 before 877afadad2dce8aae1f2aad8ce47e072d4f6165e; 3.19 (not affected: before 3.19; from 5.18.18 up to 5.18.*; from 5.19.2 up to 5.19.*; from 6.0 up to *)
- linux linux_kernel: from 3.19 before 5.18.18; from 5.19 before 5.19.2

## References

- <https://git.kernel.org/stable/c/4bf367fa1fefabdf14938d0ac9ed60020389112e> (patch)
- <https://git.kernel.org/stable/c/3b382555706558f5c0587862b6dc03e96a252bba> (patch)
- <https://git.kernel.org/stable/c/877afadad2dce8aae1f2aad8ce47e072d4f6165e> (patch)

## Sources

- CVE List: [CVE-2022-50166](https://www.cve.org/CVERecord?id=CVE-2022-50166), CVE Terms of Use, modified 2026-11-05
- NVD: [CVE-2022-50166](https://nvd.nist.gov/vuln/detail/CVE-2022-50166), Public domain, modified 2026-11-05

---

Page: https://cve.day/CVE-2022-50166 · Whole record: https://cve.day/CVE-2022-50166.json · Rebuilt by cve.day 2026-11-25T22:58:21.085Z
