summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSungwoo Kim <iam@sung-woo.kim>2024-05-02 19:09:31 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-05-17 13:02:21 +0300
commit1f7ebb69c1d65732bcac2fda9d15421f76f01e81 (patch)
tree9ceb0d68e47698e82b04b72a3230577d8abeb00c
parenta85a60e62355e3bf4802dead7938966824b23940 (diff)
downloadlinux-1f7ebb69c1d65732bcac2fda9d15421f76f01e81.tar.xz
Bluetooth: HCI: Fix potential null-ptr-deref
[ Upstream commit d2706004a1b8b526592e823d7e52551b518a7941 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
-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 1b4abf8e90f6..9274d3255049 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -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);