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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.21% (percentile 6, 2026-11-26)
- **CWE:** CWE-667
- **Published:** 2025-06-18T11:03:20.323Z
- **Modified:** 2026-11-05T20:17:25.853Z

## Who should check

- Anyone running Linux \>= 76727c02c1e14a2b561b806fa1d08acc1619ad27, \< 4bf367fa1fefabdf14938d0ac9ed60020389112e; \>= 76727c02c1e14a2b561b806fa1d08acc1619ad27, \< 3b382555706558f5c0587862b6dc03e96a252bba; \>= 76727c02c1e14a2b561b806fa1d08acc1619ad27, \< 877afadad2dce8aae1f2aad8ce47e072d4f6165e
- Anyone running Linux 3.19

## 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.

## Affected and fixed versions

- Linux: \>= 76727c02c1e14a2b561b806fa1d08acc1619ad27, \< 4bf367fa1fefabdf14938d0ac9ed60020389112e; \>= 76727c02c1e14a2b561b806fa1d08acc1619ad27, \< 3b382555706558f5c0587862b6dc03e96a252bba; \>= 76727c02c1e14a2b561b806fa1d08acc1619ad27, \< 877afadad2dce8aae1f2aad8ce47e072d4f6165e (cvelist)
- Linux: 3.19 (cvelist)

## Mitigation

- Upgrade Linux to 877afadad2dce8aae1f2aad8ce47e072d4f6165e or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-50166. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50166.md
Affected: Linux >= 76727c02c1e14a2b561b806fa1d08acc1619ad27, < 4bf367fa1fefabdf14938d0ac9ed60020389112e; >= 76727c02c1e14a2b561b806fa1d08acc1619ad27, < 3b382555706558f5c0587862b6dc03e96a252bba; >= 76727c02c1e14a2b561b806fa1d08acc1619ad27, < 877afadad2dce8aae1f2aad8ce47e072d4f6165e; Linux 3.19
Fixed in: Linux 4bf367fa1fefabdf14938d0ac9ed60020389112e, Linux 3b382555706558f5c0587862b6dc03e96a252bba, Linux 877afadad2dce8aae1f2aad8ce47e072d4f6165e

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-50166 being exploited?

There is no confirmed exploitation: CVE-2022-50166 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.21% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-50166?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-50166?

Linux \>= 76727c02c1e14a2b561b806fa1d08acc1619ad27, \< 4bf367fa1fefabdf14938d0ac9ed60020389112e; \>= 76727c02c1e14a2b561b806fa1d08acc1619ad27, \< 3b382555706558f5c0587862b6dc03e96a252bba; \>= 76727c02c1e14a2b561b806fa1d08acc1619ad27, \< 877afadad2dce8aae1f2aad8ce47e072d4f6165e; Linux 3.19.

### Is there a fix for CVE-2022-50166?

Yes. Fixed in Linux 4bf367fa1fefabdf14938d0ac9ed60020389112e, Linux 3b382555706558f5c0587862b6dc03e96a252bba, Linux 877afadad2dce8aae1f2aad8ce47e072d4f6165e. Upgrade Linux to 877afadad2dce8aae1f2aad8ce47e072d4f6165e or later.

### How do I check if I'm affected by CVE-2022-50166?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

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

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-50166>

HTML: <https://flawdb.com/CVE-2022-50166> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-50166>
