Skip to content

Commit 015d79c

Browse files
ea1davisVudentz
authored andcommitted
Bluetooth: Ignore too large handle values in BIG
hci_le_big_sync_established_evt is necessary to filter out cases where the handle value is belonging to ida id range, otherwise ida will be erroneously released in hci_conn_cleanup. Fixes: 181a42e ("Bluetooth: Make handle of hci_conn be unique") Reported-by: [email protected] Closes: https://syzkaller.appspot.com/bug?extid=b2545b087a01a7319474 Signed-off-by: Edward Adam Davis <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent 4183a7b commit 015d79c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

net/bluetooth/hci_event.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6916,6 +6916,10 @@ static void hci_le_big_sync_established_evt(struct hci_dev *hdev, void *data,
69166916

69176917
bis = hci_conn_hash_lookup_handle(hdev, handle);
69186918
if (!bis) {
6919+
if (handle > HCI_CONN_HANDLE_MAX) {
6920+
bt_dev_dbg(hdev, "ignore too large handle %u", handle);
6921+
continue;
6922+
}
69196923
bis = hci_conn_add(hdev, ISO_LINK, BDADDR_ANY,
69206924
HCI_ROLE_SLAVE, handle);
69216925
if (IS_ERR(bis))

0 commit comments

Comments
 (0)