CVE-2023-53374: Bluetooth: hci_conn: fail SCO/ISO via hci_conn_failed if ACL gone early
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: hci_conn: fail SCO/ISO via hci_conn_failed if ACL gone early
Not calling hci_(dis)connect_cfm before deleting conn referred to by a socket generally results to use-after-free.
When cleaning up SCO connections when the parent ACL is deleted too early, use hci_conn_failed to do the connection cleanup properly.
We also need to clean up ISO connections in a similar situation when connecting has started but LE Create CIS is not yet sent, so do it too here.
The Linux kernel CVE team has assigned CVE-2023-53374 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.4 with commit ca1fd42e7dbfcb34890ffbf1f2f4b356776dab6f and fixed in 6.4.16 with commit 397d58007532644b35fad746da48c41161f32a57 Issue introduced in 6.4 with commit ca1fd42e7dbfcb34890ffbf1f2f4b356776dab6f and fixed in 6.5.3 with commit e94b898463a62b72a2a8b75dea8936bf4db78e00 Issue introduced in 6.4 with commit ca1fd42e7dbfcb34890ffbf1f2f4b356776dab6f and fixed in 6.6 with commit 3344d318337d9dca928fd448e966557ec5063f85 Issue introduced in 6.3.8 with commit 75e35bd4b7935ceed2aacd82f55940e73bf0b63b
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-2023-53374
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/397d58007532644b35fad746da48c41161f32a57 https://git.kernel.org/stable/c/e94b898463a62b72a2a8b75dea8936bf4db78e00 https://git.kernel.org/stable/c/3344d318337d9dca928fd448e966557ec5063f85