All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Bluetooth: virtio_bt: harden probe error paths
@ 2026-08-11  3:27 Yi Cong
  2026-08-11  3:27 ` [PATCH 1/2] Bluetooth: virtio_bt: fix leak of vbt on virtio_find_vqs failure Yi Cong
  2026-08-11  3:27 ` [PATCH 2/2] Bluetooth: virtio_bt: unregister hdev before freeing on open failure Yi Cong
  0 siblings, 2 replies; 4+ messages in thread
From: Yi Cong @ 2026-08-11  3:27 UTC (permalink / raw)
  To: marcel, luiz.dentz; +Cc: linux-bluetooth, stable, Yi Cong

From: Yi Cong <yicong@kylinos.cn>

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(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-08-11  4:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-11  3:27 [PATCH 0/2] Bluetooth: virtio_bt: harden probe error paths Yi Cong
2026-08-11  3:27 ` [PATCH 1/2] Bluetooth: virtio_bt: fix leak of vbt on virtio_find_vqs failure Yi Cong
2026-08-11  4:45   ` Bluetooth: virtio_bt: harden probe error paths bluez.test.bot
2026-08-11  3:27 ` [PATCH 2/2] Bluetooth: virtio_bt: unregister hdev before freeing on open failure Yi Cong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.