Skip to content
Snippets Groups Projects
Commit 92fe24a7 authored by Desmond Cheong Zhi Xi's avatar Desmond Cheong Zhi Xi Committed by Marcel Holtmann
Browse files

Bluetooth: skip invalid hci_sync_conn_complete_evt

Syzbot reported a corrupted list in kobject_add_internal [1]. This
happens when multiple HCI_EV_SYNC_CONN_COMPLETE event packets with
status 0 are sent for the same HCI connection. This causes us to
register the device more than once which corrupts the kset list.

As this is forbidden behavior, we add a check for whether we're
trying to process the same HCI_EV_SYNC_CONN_COMPLETE event multiple
times for one connection. If that's the case, the event is invalid, so
we report an error that the device is misbehaving, and ignore the
packet.

Link: https://syzkaller.appspot.com/bug?extid=66264bf2fd0476be7e6c

 [1]
Reported-by: default avatar <syzbot+66264bf2fd0476be7e6c@syzkaller.appspotmail.com>
Tested-by: default avatar <syzbot+66264bf2fd0476be7e6c@syzkaller.appspotmail.com>
Signed-off-by: default avatarDesmond Cheong Zhi Xi <desmondcheongzx@gmail.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent a25fca4d
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment