Bluetooth: L2CAP: Fix deadlock in l2cap_conn_del()
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: Fix deadlock in l2cap_conn_del()
l2cap_conn_del() calls cancel_delayed_work_sync() for both info_timer and id_addr_timer while holding conn->lock. However, the work functions l2cap_info_timeout() and l2cap_conn_update_id_addr() both acquire conn->lock, creating a potential AB-BA deadlock if the work is already executing when l2cap_conn_del() takes the lock.
Move the work cancellations before acquiring conn->lock and use disable_delayed_work_sync() to additionally prevent the works from being rearmed after cancellation, consistent with the pattern used in hci_conn_del().
From the CVE record · Linux
The Linux kernel’s Bluetooth L2CAP connection cleanup can deadlock if a delayed work function is already running when cleanup acquires the connection lock. The input does not establish how an attacker could trigger this condition or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with the affected Bluetooth L2CAP code should check their kernel version; affected versions are not specified.