HIGH
bluetooth btusb UAF
CVE-2025-71082
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI7.8HIGH
01Description
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.
02KernelScan AI Analysis
Risk summary
Local attackers with low privileges can trigger a use-after-free vulnerability in the Bluetooth USB driver by manipulating USB interface disconnection. This can lead to arbitrary code execution, privilege escalation, or system crashes when Bluetooth USB devices are present.
Vulnerability analysis
The vulnerability stems from incorrect use of devm_kzalloc() in btusb_probe(), which ties the lifetime of driver data to a single USB interface (INTF), while the btusb driver binds to multiple interfaces (INTF, ISOC, DIAG). When btusb_disconnect() calls usb_driver_release_interface(), the devm subsystem automatically frees the shared data structure, but other interfaces may still reference this freed memory, creating a use-after-free condition. The fix reverts to explicit memory management with kzalloc/kfree to ensure proper lifetime control across all bound interfaces. This is locally exploitable and requires the presence of a Bluetooth USB adapter.
03Fix Versions
| Branch | Fixed in | Patch commit |
|---|---|---|
| 5.15 | 5.15.198 | fff9206b0907 |
| 6.1 | 6.1.160 | cca0e9206e3b |
| 6.12 | 6.12.64 | 1e54c19eaf84 |
| 6.18 | 6.18.4 | fdf7c640fb8a |
| 6.6 | 6.6.120 | c0ecb3e4451f |
| mainline | 6.19 | 252714f1e8bd |