Bluetooth: hci_core: Fix UAF in hci_unregister_dev()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 0d151a103775dd9645c78c97f77d6e2a5298d913 · < 5edcc018fa6e80b2c478454a4a8229c23d67c181| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: hci_core: Fix UAF in hci_unregister_dev()
hci_unregister_dev() does not disable cmd_timer and ncmd_timer before the hci_dev structure is freed. If a timeout fires during device teardown, the callback dereferences freed memory (including the hdev->reset function pointer), leading to a use-after-free.
Add disable_delayed_work_sync() calls alongside the existing disable_work_sync() calls to ensure both timers are fully quiesced before teardown proceeds.
From the CVE record · Linux
The Linux kernel's Bluetooth hci_core does not stop two timers before freeing a device structure. If a timer fires during device teardown, its callback can access freed memory, including a function pointer. The input does not specify how an attacker could trigger this or whether authentication or user interaction is required.
Engineers running the Linux kernel should check their deployments; affected versions are not specified.