Bluetooth: hci_event: fix LE list UAF on reset
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ a4d5504d5c39cc84f1f828e19967595597a8136e · < 25b05e3ce31d954540e99954bcc66cbceb27ab35| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: hci_event: fix LE list UAF on reset
hci_cc_reset() clears the LE accept and resolving lists without taking hdev->lock. Other command-complete handlers serialize updates to these lists with that lock, and the debugfs readers hold it while walking them.
This permits the reset completion and a debugfs read to interleave as follows:
hci_rx_work debugfs reader ----------- -------------- lock hdev->lock fetch current entry list_del(entry) kfree(entry) read entry fields
The reader then dereferences a freed list entry and may follow its stale next pointer.
KASAN reported:
BUG: KASAN: slab-use-after-free in white_list_show+0x15f/0x180 Read of size 1 at addr ffff8881015dab16 by task poc/95
From the CVE record · Linux
The Linux kernel’s Bluetooth reset completion clears LE lists without the lock used by debugfs readers. A local debugfs read that overlaps a reset completion can dereference a freed list entry; the input does not establish whether authentication is needed.
Engineers running the Linux kernel with Bluetooth and debugfs access should check their kernel versions against the vendor advisory; affected versions were not provided.