Bluetooth: btusb: revert use of devm_kzalloc in btusb
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 98921dbd00c4e2e4bdd56423cb5edf98d57b45f7 · < 252714f1e8bdd542025b16321c790458014d6880| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: btusb: revert use of devm_kzalloc in btusb
This reverts commit 98921dbd00c4e ("Bluetooth: Use devm_kzalloc in btusb.c file").
In btusb_probe(), we use devm_kzalloc() to allocate the btusb data. This ties the lifetime of all the btusb data to the binding of a driver to one interface, INTF. In a driver that binds to other interfaces, ISOC and DIAG, this is an accident waiting to happen.
The issue is revealed in btusb_disconnect(), where calling usb_driver_release_interface(&btusb_driver, data->intf) will have devm free the data that is also being used by the other interfaces of the driver that may not be released yet.
To fix this, revert the use of devm and go back to freeing memory explicitly.
From the CVE record · Linux
The Linux kernel’s Bluetooth btusb driver can free shared data when one USB interface disconnects while other interfaces still use it. This creates a use-after-free condition; the input does not specify whether an attacker can trigger it remotely, whether authentication is needed, or whether user interaction is required.
Engineers running Linux kernels with the Bluetooth btusb driver should check their kernel versions; affected versions are not specified.