diff options
| author | Tulio Fernandes <tuliomf09@gmail.com> | 2025-02-05 18:50:34 -0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-02-21 14:01:15 +0100 |
| commit | cdd9a1ea23ff1a272547217100663e8de4eada40 (patch) | |
| tree | fb49b2ee09e23a5eb52051eb4360eae77ae03a59 /scripts | |
| parent | ba6ab3f04d0bae2dad76d82d427bbcec365f73a1 (diff) | |
| download | linux-cdd9a1ea23ff1a272547217100663e8de4eada40.tar.gz linux-cdd9a1ea23ff1a272547217100663e8de4eada40.tar.bz2 linux-cdd9a1ea23ff1a272547217100663e8de4eada40.zip | |
HID: hid-thrustmaster: fix stack-out-of-bounds read in usb_check_int_endpoints()
[ Upstream commit 0b43d98ff29be3144e86294486b1373b5df74c0e ]
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: syzbot+9c9179ac46169c56c1ad@syzkaller.appspotmail.com
Fixes: 50420d7c79c3 ("HID: hid-thrustmaster: Fix warning in thrustmaster_probe by adding endpoint check")
Signed-off-by: TĂșlio Fernandes <tuliomf09@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
