Skip to content
Snippets Groups Projects
Commit 0b43d98f authored by Tulio Fernandes's avatar Tulio Fernandes Committed by Jiri Kosina
Browse files

HID: hid-thrustmaster: fix stack-out-of-bounds read in usb_check_int_endpoints()

Syzbot[1] has detected a stack-out-of-bounds read of the ep_addr array from
hid-thrustmaster driver. This array is passed to usb_check_int_endpoints
function from usb.c core driver, which executes a for loop that iterates
over the elements of the passed array. Not finding a null element at the end of
the array, it tries to read the next, non-existent element, crashing the kernel.

To fix this, a 0 element was added at the end of the array to break the for
loop.

[1] https://syzkaller.appspot.com/bug?extid=9c9179ac46169c56c1ad



Reported-by: default avatar <syzbot+9c9179ac46169c56c1ad@syzkaller.appspotmail.com>
Fixes: 50420d7c ("HID: hid-thrustmaster: Fix warning in thrustmaster_probe by adding endpoint check")
Signed-off-by: default avatarTúlio Fernandes <tuliomf09@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.com>
parent 819083cb
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.
Please register or to comment