]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Nov 2024 01:02:37 +0000 (02:02 +0100)
commitd75aad1d3143ca68cda52ff80ac392e1bbd84325
tree0e9e75e8203f680819e87f2ea1b5e9f7025c3fad
parent80b05fbfa998480fb3d5299d93eab946f51e9c36
Bluetooth: ISO: Fix UAF on iso_sock_timeout

[ Upstream commit 246b435ad668596aa0e2bbb9d491b6413861211a ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/iso.c