CVE-2022-50447: Bluetooth: hci_conn: Fix crash on hci_create_cis_sync
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: hci_conn: Fix crash on hci_create_cis_sync
When attempting to connect multiple ISO sockets without using DEFER_SETUP may result in the following crash:
BUG: KASAN: null-ptr-deref in hci_create_cis_sync+0x18b/0x2b0 Read of size 2 at addr 0000000000000036 by task kworker/u3:1/50 CPU: 0 PID: 50 Comm: kworker/u3:1 Not tainted 6.0.0-rc7-02243-gb84a13ff4eda #4373 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.0-1.fc36 04/01/2014 Workqueue: hci0 hci_cmd_sync_work Call Trace: <TASK> dump_stack_lvl+0x19/0x27 kasan_report+0xbc/0xf0 ? hci_create_cis_sync+0x18b/0x2b0 hci_create_cis_sync+0x18b/0x2b0 ? get_link_mode+0xd0/0xd0 ? __ww_mutex_lock_slowpath+0x10/0x10 ? mutex_lock+0xe0/0xe0 ? get_link_mode+0xd0/0xd0 hci_cmd_sync_work+0x111/0x190 process_one_work+0x427/0x650 worker_thread+0x87/0x750 ? process_one_work+0x650/0x650 kthread+0x14e/0x180 ? kthread_exit+0x50/0x50 ret_from_fork+0x22/0x30 </TASK>
The Linux kernel CVE team has assigned CVE-2022-50447 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.0 with commit 26afbd826ee326e63a334c37fd45e82e50a615ec and fixed in 6.0.16 with commit a190cd9dc62d6ebeb679c1abe9dda4162dfefc84 Issue introduced in 6.0 with commit 26afbd826ee326e63a334c37fd45e82e50a615ec and fixed in 6.1.2 with commit 09a3b0c9c7c6b10587fbb610b718014703cff341 Issue introduced in 6.0 with commit 26afbd826ee326e63a334c37fd45e82e50a615ec and fixed in 6.2 with commit 50757a259ba78c4e938b5735e76ffec6cd0c942e
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2022-50447
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
net/bluetooth/hci_conn.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/a190cd9dc62d6ebeb679c1abe9dda4162dfefc84 https://git.kernel.org/stable/c/09a3b0c9c7c6b10587fbb610b718014703cff341 https://git.kernel.org/stable/c/50757a259ba78c4e938b5735e76ffec6cd0c942e