Skip to content

Commit

Permalink
Bluetooth: HCI: Fix potential null-ptr-deref
Browse files Browse the repository at this point in the history
[ Upstream commit d270600 ]

Fix potential null-ptr-deref in hci_le_big_sync_established_evt().

Fixes: f777d88 (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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
swkim101 authored and gregkh committed May 17, 2024
1 parent a85a60e commit 1f7ebb6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -7200,6 +7200,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);
Expand Down

0 comments on commit 1f7ebb6

Please sign in to comment.