{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-50166","id":"CVE-2022-50166","title":"Bluetooth: When HCI work queue is drained, only queue chained work","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nBluetooth: When HCI work queue is drained, only queue chained work\n\nThe HCI command, event, and data packet processing workqueue is drained\nto avoid deadlock in commit\n76727c02c1e1 (\"Bluetooth: Call drain_workqueue() before resetting state\").\n\nThere is another delayed work, which will queue command to this drained\nworkqueue. Whic","descriptionLong":"In the Linux kernel, the following vulnerability has been resolved:\n\nBluetooth: When HCI work queue is drained, only queue chained work\n\nThe HCI command, event, and data packet processing workqueue is drained\nto avoid deadlock in commit\n76727c02c1e1 (\"Bluetooth: Call drain_workqueue() before resetting state\").\n\nThere is another delayed work, which will queue command to this drained\nworkqueue. Which results in the following error report:\n\nBluetooth: hci2: command 0x040f tx timeout\nWARNING: CPU: 1 PID: 18374 at kernel/workqueue.c:1438 __queue_work+0xdad/0x1140\nWorkqueue: events hci_cmd_timeout\nRIP: 0010:__queue_work+0xdad/0x1140\nRSP: 0000:ffffc90002cffc60 EFLAGS: 00010093\nRAX: 0000000000000000 RBX: ffff8880b9d3ec00 RCX: 0000000000000000\nRDX: ffff888024ba0000 RSI: ffffffff814e048d RDI: ffff8880b9d3ec08\nRBP: 0000000000000008 R08: 0000000000000000 R09: 00000000b9d39700\nR10: ffffffff814f73c6 R11: 0000000000000000 R12: ffff88807cce4c60\nR13: 0000000000000000 R14: ffff8880796d8800 R15: ffff8880796d8800\nFS:  0000000000000000(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000\nCS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\nCR2: 000000c0174b4000 CR3: 000000007cae9000 CR4: 00000000003506e0\nDR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000\nDR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400\nCall Trace:\n <TASK>\n ? queue_work_on+0xcb/0x110\n ? lockdep_hardirqs_off+0x90/0xd0\n queue_work_on+0xee/0x110\n process_one_work+0x996/0x1610\n ? pwq_dec_nr_in_flight+0x2a0/0x2a0\n ? rwlock_bug.part.0+0x90/0x90\n ? _raw_spin_lock_irq+0x41/0x50\n worker_thread+0x665/0x1080\n ? process_one_work+0x1610/0x1610\n kthread+0x2e9/0x3a0\n ? kthread_complete_and_exit+0x40/0x40\n ret_from_fork+0x1f/0x30\n </TASK>\n\nTo fix this, we can add a new HCI_DRAIN_WQ flag, and don't queue the\ntimeout workqueue while command workqueue is draining.","published":"2025-06-18T11:03:20.323Z","updated":"2026-11-07T02:30:41.538835193Z","reserved":"2025-06-18T10:57:27.426Z","status":"Analyzed","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},"metrics":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"}],"rating":"medium","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"76727c02c1e14a2b561b806fa1d08acc1619ad27","lessThan":"4bf367fa1fefabdf14938d0ac9ed60020389112e","status":"affected","versionType":"git"},{"version":"76727c02c1e14a2b561b806fa1d08acc1619ad27","lessThan":"3b382555706558f5c0587862b6dc03e96a252bba","status":"affected","versionType":"git"},{"version":"76727c02c1e14a2b561b806fa1d08acc1619ad27","lessThan":"877afadad2dce8aae1f2aad8ce47e072d4f6165e","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.19","status":"affected"},{"version":"0","lessThan":"3.19","status":"unaffected","versionType":"semver"},{"version":"5.18.18","lessThanOrEqual":"5.18.*","status":"unaffected","versionType":"semver"},{"version":"5.19.2","lessThanOrEqual":"5.19.*","status":"unaffected","versionType":"semver"},{"version":"6.0","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-667"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/4bf367fa1fefabdf14938d0ac9ed60020389112e","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/3b382555706558f5c0587862b6dc03e96a252bba","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/877afadad2dce8aae1f2aad8ce47e072d4f6165e","tags":["Patch","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50166.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50166","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00192,"epssPercentile":0.08976,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-50166","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50166","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-50166","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-50166","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}