{"id":"CVE-2022-50339","published":"2025-09-16T16:11:19Z","modified":"2026-08-05T08:58:17Z","title":"Bluetooth: avoid hci_dev_test_and_set_flag() in mgmt_init_hdev()","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nBluetooth: avoid hci_dev_test_and_set_flag() in mgmt_init_hdev()\n\nsyzbot is again reporting attempt to cancel uninitialized work\nat mgmt_index_removed() [1], for setting of HCI_MGMT flag from\nmgmt_init_hdev() from hci_mgmt_cmd() from hci_sock_sendmsg() can\nrace with testing of HCI_MGMT flag from mgmt_index_removed() from\nhci_sock_bind() due to lack of serialization via hci_dev_lock().\n\nSince mgmt_init_hdev() is called with mgmt_chan_list_lock held, we can\nsafely split hci_dev_test_and_set_flag() into hci_dev_test_flag() and\nhci_dev_set_flag(). Thus, in order to close this race, set HCI_MGMT flag\nafter INIT_DELAYED_WORK() completed.\n\nThis is a local fix based on mgmt_chan_list_lock. Lack of serialization\nvia hci_dev_lock() might be causing different race conditions somewhere\nelse. But a global fix based on hci_dev_lock() should deserve a future\npatch.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00108,"percentile":0.01206,"provenance":"source"},"cwes":[{"id":"CWE-362","name":"Concurrent Execution using Shared Resource with Improper Synchronization"}],"references":[{"url":"https://git.kernel.org/stable/c/e53c6180db8dd09de94e0a3bdf4fef6f5f9dd6e6","tags":[]},{"url":"https://git.kernel.org/stable/c/f74ca25d6d6629ffd4fd80a1a73037253b57d06b","tags":[]}],"priority":{"score":5.7,"factors":[{"name":"EPSS percentile","points":0.24},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 3f2893d3c142986aa935821460cb3adb77044722, < e53c6180db8dd09de94e0a3bdf4fef6f5f9dd6e6",">= 3f2893d3c142986aa935821460cb3adb77044722, < f74ca25d6d6629ffd4fd80a1a73037253b57d06b"]},{"vendor":"Linux","product":"Linux","versions":["6.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-01-14T18:19:15.738388Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2022-55623","exploited":false,"provenance":"source"}}