Bluetooth: ISO: validate sockaddr_iso first in iso_sock_rebind_bis()
authorPauli Virtanen <pav@iki.fi>
Fri, 24 Jul 2026 20:20:28 +0000 (23:20 +0300)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 28 Jul 2026 20:13:12 +0000 (16:13 -0400)
commit4e20192d46a685d73e590a60a4a2419a0a8afcbf
treefc6476e166e4ecdd57572d1620dc8d1b08a5c1ad
parente9cb51813d79fc9aae4a2098aab3ab6ebd7fb6c8
Bluetooth: ISO: validate sockaddr_iso first in iso_sock_rebind_bis()

iso_sock_rebind_bis() updates socket iso_pi(sk)->bc_num_bis before
validating the BIS values, so it's possible to end up with bc_num_bis
inconsistent.

Assign to iso_pi(sk)->bc_num_bis only after validation.

Fixes: 80837140c1f2 ("Bluetooth: ISO: Allow binding a PA sync socket")
Signed-off-by: Pauli Virtanen <pav@iki.fi>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/iso.c