Skip to content
Commit fc3ef2e3 authored by Pavel Skripkin's avatar Pavel Skripkin Committed by Jiri Kosina
Browse files

HID: hid-thrustmaster: fix OOB read in thrustmaster_interrupts



Syzbot reported an slab-out-of-bounds Read in thrustmaster_probe() bug.
The root case is in missing validation check of actual number of endpoints.

Code should not blindly access usb_host_interface::endpoint array, since
it may contain less endpoints than code expects.

Fix it by adding missing validaion check and print an error if
number of endpoints do not match expected number

Fixes: c49c3363 ("HID: support for initialization of some Thrustmaster wheels")
Reported-and-tested-by: default avatar <syzbot+35eebd505e97d315d01c@syzkaller.appspotmail.com>
Signed-off-by: default avatarPavel Skripkin <paskripkin@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent ac898952
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment