Bluetooth: L2CAP: use proto_lock for l2cap_data to fix l2cap_disconn_ind
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: L2CAP: use proto_lock for l2cap_data to fix l2cap_disconn_ind
hci_conn::l2cap_data is accessed without locks in l2cap_disconn_ind via hci_conn_timeout (disc_work) -> hci_proto_disconn_ind -> l2cap_disconn_ind. This is UAF if the l2cap_conn is deleted concurrently.
disc_work is disabled sync in hci_conn_del(), so we cannot take hci_dev_lock in disc_work.
Fix by using proto_lock to guard l2cap_data, in addition to hdev->lock which is held in other access paths.
From the CVE record · Linux
The Linux kernel accesses hci_conn::l2cap_data without a lock during L2CAP disconnection. If the L2CAP connection is deleted concurrently, this can cause a use-after-free. The input does not specify how an attacker could trigger it or whether network access, authentication, or user interaction is required.
Operators running the Linux kernel should check their versions; affected versions are not specified.