]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
HID: holtek: fix slab-out-of-bounds Write in holtek_kbd_input_event
authorMa Ke <make_ruc2021@163.com>
Mon, 18 Sep 2023 02:40:59 +0000 (10:40 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Oct 2023 09:59:00 +0000 (11:59 +0200)
commite6e9a32c3e605738d83559ebdcf5bf3380f4a029
tree7d4919d42a1ba038a4a4b9d408d7b08707afb2cf
parent06aabf7715dab554a753741d4cd077d29716260d
HID: holtek: fix slab-out-of-bounds Write in holtek_kbd_input_event

[ Upstream commit ffe3b7837a2bb421df84d0177481db9f52c93a71 ]

There is a slab-out-of-bounds Write bug in hid-holtek-kbd 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.

Signed-off-by: Ma Ke <make_ruc2021@163.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hid/hid-holtek-kbd.c