Bluetooth: hci_sync: extend conn_hash lookup critical sections
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: hci_sync: extend conn_hash lookup critical sections
Using RCU-protected pointers outside the critical sections without refcount is incorrect and may result to UAF.
Extend critical section to cover both hci_conn_hash lookup and use of the returned conn.
Add surrounding rcu_read_lock() also when return value is not used, in preparation for RCU lockdep requirement to hci_lookup_le_connect().
This avoids concurrent deletion of the conn before we are done dereferencing it.
Also, make sure to hold hdev->lock when accessing hdev->accept_list.
From the CVE record · Linux
The Linux kernel’s Bluetooth hci_sync code can use a connection pointer after it has been freed during concurrent deletion. The input does not specify what an attacker could do, whether access is local or network-based, or whether authentication or user interaction is required.
Engineers running Linux kernels with the affected Bluetooth hci_sync code should check their kernel version; affected versions are not specified.