Bluetooth: hci_sync: hold conn in hci_connect_acl/le_sync() callbacks
authorPauli Virtanen <pav@iki.fi>
Sat, 25 Jul 2026 09:59:18 +0000 (12:59 +0300)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 28 Jul 2026 20:13:13 +0000 (16:13 -0400)
commit2f5d635ad5906b0235bc0c870e8beba3116e1e98
tree33bb01428510e4d9f4776ae34e94d3540f786926
parent5761d003daa987ac81463f570713ce9c9dd204e5
Bluetooth: hci_sync: hold conn in hci_connect_acl/le_sync() callbacks

There is theoretical UAF if the conn is freed while the hci_sync task
is running.

Hold refcount to avoid that.

Fixes: 881559af5f5c ("Bluetooth: hci_sync: Attempt to dequeue connection attempt")
Signed-off-by: Pauli Virtanen <pav@iki.fi>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/hci_sync.c