Bluetooth: ISO: Fix UAF on iso_sock_timeout
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 22 Oct 2024 19:35:49 +0000 (15:35 -0400)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 23 Oct 2024 14:21:14 +0000 (10:21 -0400)
commit246b435ad668596aa0e2bbb9d491b6413861211a
tree8582bba5fa0274ee5772f7072283e3adc9cd62b6
parent1bf4470a3939c678fb822073e9ea77a0560bc6bb
Bluetooth: ISO: Fix UAF on iso_sock_timeout

conn->sk maybe have been unlinked/freed while waiting for iso_conn_lock
so this checks if the conn->sk is still valid by checking if it part of
iso_sk_list.

Fixes: ccf74f2390d6 ("Bluetooth: Add BTPROTO_ISO socket type")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/iso.c