CVE-2022-50339
HighIn the Linux kernel, the following vulnerability has been resolved: Bluetooth: avoid hci_dev_test_and_set_flag() in mgmt_init_hdev() syzbot is again reporting attempt to cancel uninitialized work at mgmt_index_removed() [1], for setting of HCI_MGMT flag from mgmt_init_hdev() from hci_mgmt_cmd() from hci_sock_sendmsg() can race with testing of HCI_MGMT flag from mgmt_index_removed() from hci_sock_bind() due to lack of serialization via hci_dev_lock(). Since mgmt_init_hdev() is called with mgmt_chan_list_lock held, we can safely split hci_dev_test_and_set_flag() into hci_dev_test_flag() and hci_dev_set_flag(). Thus, in order to close this race, set HCI_MGMT flag after INIT_DELAYED_WORK() completed. This is a local fix based on mgmt_chan_list_lock. Lack of serialization via hci_dev_lock() might be causing different race conditions somewhere else. But a global fix based on hci_dev_lock() should deserve a future patch.
CVSS 3.1 score
7.0
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness type
CWE-362CVE-2022-50339 is a Race Condition vulnerability
What is Race Condition?
The product contains a code sequence that can run concurrently with other code, creating unexpected states. Learn more on MITRE CWE
Affected versions
Linux kernel versions
6.0
and later are affected. Fixed in
6.0.3,
6.1
and their respective stable series.
References
The following references provide additional information about CVE-2022-50339 including vendor advisories, patch commits, exploit details, and third-party analysis. Links are sourced from the NIST NVD database.
-
PatchKernel patch commithttps://git.kernel.org/stable/c/e53c6180db8dd09de94e0a3bdf4fef6f5f9dd6e6
-
PatchKernel patch commithttps://git.kernel.org/stable/c/f74ca25d6d6629ffd4fd80a1a73037253b57d06b
Frequently asked questions
-
What is CVE-2022-50339?
CVE-2022-50339 is a High severity Linux kernel vulnerability with a CVSS score of 7.0 out of 10 , classified as a Race Condition flaw (CWE-362) . It affects Linux kernel versions from 6.0 onward and has been patched in 6.0.3 and 6.1. CVE-2022-50339 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.
-
What is the CVSS score for CVE-2022-50339?
CVE-2022-50339 has a CVSS score of 7.0 out of 10, rated High severity (CVSS 3.1). The vector string is
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H. -
Is there a patch available for CVE-2022-50339?
Yes — CVE-2022-50339 has been patched. Fixed versions include 6.0.3 and 6.1. If you are running Linux kernel 6.0 or later up to the fix versions, apply the relevant patch for your kernel branch.
-
Is CVE-2022-50339 actively exploited?
No — CVE-2022-50339 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.
-
What is Race Condition (CWE-362)?
The product contains a code sequence that can run concurrently with other code, creating unexpected states. View CWE-362 on MITRE CWE →