summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorPavel Skripkin <paskripkin@gmail.com>2022-02-20 19:01:14 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-03-16 16:23:35 +0300
commit3ffbe85cda7f523dad896bae08cecd8db8b555ab (patch)
tree4819fedbd2a0607dbf7a00c7390b6e8601bdab05 /arch
parenta5334502f91fe68b7edee502af20b292ad42259a (diff)
downloadlinux-3ffbe85cda7f523dad896bae08cecd8db8b555ab.tar.xz
HID: hid-thrustmaster: fix OOB read in thrustmaster_interrupts
[ Upstream commit fc3ef2e3297b3c0e2006b5d7b3d66965e3392036 ] 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: c49c33637802 ("HID: support for initialization of some Thrustmaster wheels") Reported-and-tested-by: syzbot+35eebd505e97d315d01c@syzkaller.appspotmail.com Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions