]> git.baikalelectronics.ru Git - kernel.git/commit
HID: bigben: fix slab-out-of-bounds Write in bigben_probe
authorDongliang Mu <mudongliangabcd@gmail.com>
Fri, 6 May 2022 07:24:25 +0000 (15:24 +0800)
committerJiri Kosina <jkosina@suse.cz>
Fri, 6 May 2022 08:46:36 +0000 (10:46 +0200)
commit5f1a3299c869b97d96d324e1488b5af5ce060dba
treed72e367f8d76596c65a45e7e6acb537b7f3bab51
parent0b2f65d044e624583c855f7b54a3662e5ff2c446
HID: bigben: fix slab-out-of-bounds Write in bigben_probe

There is a slab-out-of-bounds Write bug in hid-bigbenff driver.
The problem is the driver assumes the device must have an input but
some malicious devices violate this assumption.

Fix this by checking hid_device's input is non-empty before its usage.

Reported-by: syzkaller <syzkaller@googlegroups.com>
Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-bigbenff.c