Bluetooth: fix locking in hci_conn_request_evt() with HCI_PROTO_DEFER
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 70c464256310e1c3716099b9d02ece4169272f73 · < 385b2d0468a0871fc716c549fa3b0c257c7dbcb3| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: fix locking in hci_conn_request_evt() with HCI_PROTO_DEFER
When protocol sets HCI_PROTO_DEFER, hci_conn_request_evt() calls hci_connect_cfm(conn) without hdev->lock. Generally hci_connect_cfm() assumes it is held, and if conn is deleted concurrently -> UAF.
Only SCO and ISO set HCI_PROTO_DEFER and only for defer setup listen, and HCI_EV_CONN_REQUEST is not generated for ISO. In the non-deferred listening socket code paths, hci_connect_cfm(conn) is called with hdev->lock held.
Fix by holding the lock.
From the CVE record · Linux
A locking flaw in the Linux kernel’s Bluetooth connection-request handler can cause a use-after-free if a connection is deleted concurrently during deferred SCO setup. The input does not establish how an attacker could trigger this condition or whether authentication or user interaction is required.
Engineers running Linux kernels with Bluetooth deferred SCO setup should check whether their kernel is affected; affected versions were not provided.