summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorSungwoo Kim <iam@sung-woo.kim>2024-05-02 12:09:31 -0400
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2024-05-03 13:05:53 -0400
commitd2706004a1b8b526592e823d7e52551b518a7941 (patch)
tree40a4cf446816bc64573c87020d4dd279759efdf2 /net
parentcd17bcbd2b33d7c816b80640ae2fef2507576278 (diff)
Bluetooth: HCI: Fix potential null-ptr-deref
Fix potential null-ptr-deref in hci_le_big_sync_established_evt(). Fixes: f777d8827817 (Bluetooth: ISO: Notify user space about failed bis connections) Signed-off-by: Sungwoo Kim <iam@sung-woo.kim> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_event.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 4a27e4a17a67..d72d238c1656 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -7037,6 +7037,8 @@ static void hci_le_big_sync_established_evt(struct hci_dev *hdev, void *data,
u16 handle = le16_to_cpu(ev->bis[i]);
bis = hci_conn_hash_lookup_handle(hdev, handle);
+ if (!bis)
+ continue;
set_bit(HCI_CONN_BIG_SYNC_FAILED, &bis->flags);
hci_connect_cfm(bis, ev->status);