Bluetooth: virtio_bt: harden probe error paths
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | Bluetooth: virtio_bt: fix leak of vbt on virtio_find_vqs failuredrivers/ | +4 | 1 reply | |
| 2/2 | Bluetooth: virtio_bt: unregister hdev before freeing on open failuredrivers/ | +1 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] Bluetooth: virtio_bt: harden probe error paths
From: Yi Cong <[email protected]>
This small series hardens the two error paths in virtbt_probe() that currently leak or leave dangling state behind:
1/2 - if virtio_find_vqs() fails, the allocated 'vbt' and the
'vdev->priv' pointer that already references it are leaked.
2/2 - if virtbt_open_vdev() fails after hci_register_dev() has
succeeded, the hdev is freed without unregistering, leaving a dangling entry in the global HCI device list (UAF).
Fixes afd2daa26c7a ("Bluetooth: Add support for virtio transport driver")
Yi Cong (2):
Bluetooth: virtio_bt: fix leak of vbt on virtio_find_vqs failure
Bluetooth: virtio_bt: unregister hdev before freeing on open failure
drivers/bluetooth/virtio_bt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
Signature · 1 line
2.25.1