Dmitry Torokhov
4f38821772
HID: hid-input: clear unmapped usages
...
We should not be leaving half-mapped usages with potentially invalid
keycodes, as that may confuse hidinput_find_key() when the key is located
by index, which may end up feeding way too large keycode into the VT
keyboard handler and cause OOB write there:
BUG: KASAN: global-out-of-bounds in clear_bit include/asm-generic/bitops-instrumented.h:56 [inline]
BUG: KASAN: global-out-of-bounds in kbd_keycode drivers/tty/vt/keyboard.c:1411 [inline]
BUG: KASAN: global-out-of-bounds in kbd_event+0xe6b/0x3790 drivers/tty/vt/keyboard.c:1495
Write of size 8 at addr ffffffff89a1b2d8 by task syz-executor108/1722
...
kbd_keycode drivers/tty/vt/keyboard.c:1411 [inline]
kbd_event+0xe6b/0x3790 drivers/tty/vt/keyboard.c:1495
input_to_handler+0x3b6/0x4c0 drivers/input/input.c:118
input_pass_values.part.0+0x2e3/0x720 drivers/input/input.c:145
input_pass_values drivers/input/input.c:949 [inline]
input_set_keycode+0x290/0x320 drivers/input/input.c:954
evdev_handle_set_keycode_v2+0xc4/0x120 drivers/input/evdev.c:882
evdev_do_ioctl drivers/input/evdev.c:1150 [inline]
Cc: stable@vger.kernel.org
Reported-by: syzbot+19340dff067c2d3835c0@syzkaller.appspotmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2019-12-13 13:43:15 +01:00
..
2019-12-13 13:03:48 +01:00
2019-11-02 21:08:36 +01:00
2019-10-23 17:23:43 +02:00
2019-08-05 14:37:15 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-09-04 09:22:55 +02:00
2019-06-05 17:36:37 +02:00
2019-12-13 10:26:18 +01:00
2019-05-21 10:50:45 +02:00
2019-10-03 15:36:40 -04:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2018-09-24 11:49:32 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:36:37 +02:00
2019-12-11 15:17:39 +01:00
2019-05-30 11:26:32 -07:00
2019-08-22 17:11:58 +02:00
2019-08-19 14:13:00 +02:00
2019-09-03 16:52:04 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:35 -07:00
2019-10-03 15:36:40 -04:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:37:04 +02:00
2019-10-03 15:36:40 -04:00
2019-05-30 11:26:32 -07:00
2019-10-03 15:36:40 -04:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-08-22 17:11:58 +02:00
2019-11-29 20:39:21 +01:00
2019-05-30 11:26:37 -07:00
2019-05-30 11:26:32 -07:00
2019-08-05 14:18:42 +02:00
2019-05-30 11:26:32 -07:00
2019-10-03 15:36:40 -04:00
2019-11-21 20:10:45 -05:00
2019-05-30 11:26:32 -07:00
2019-12-13 13:03:48 +01:00
2019-12-13 13:43:15 +01:00
2019-12-13 10:25:01 +01:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:37:10 +02:00
2019-08-22 17:11:58 +02:00
2019-10-03 15:36:40 -04:00
2019-10-03 15:36:40 -04:00
2019-10-03 15:36:40 -04:00
2017-11-02 11:10:55 +01:00
2019-10-03 20:48:28 +02:00
2019-08-22 09:53:08 +02:00
2017-11-02 11:10:55 +01:00
2019-10-03 15:36:40 -04:00
2019-09-22 22:39:01 +02:00
2019-11-29 20:37:55 +01:00
2019-04-03 17:14:13 +02:00
2019-05-30 11:26:32 -07:00
2019-01-14 20:11:01 +01:00
2019-05-30 11:26:37 -07:00
2019-10-03 15:36:40 -04:00
2019-05-30 11:26:32 -07:00
2019-12-09 13:55:05 +01:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:30:28 +02:00
2019-06-05 17:30:28 +02:00
2019-08-22 17:11:58 +02:00
2019-06-05 17:30:28 +02:00
2019-06-28 12:30:08 +02:00
2019-06-05 17:30:28 +02:00
2019-06-05 17:30:28 +02:00
2019-06-05 17:30:28 +02:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:36:37 +02:00
2019-10-01 16:21:04 +02:00
2019-12-13 10:17:00 +01:00
2018-06-25 15:23:40 +02:00
2019-05-30 11:26:32 -07:00
2019-11-18 10:23:45 +01:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-07-14 16:09:19 +03:00
2019-08-22 17:11:58 +02:00
2019-05-30 11:26:35 -07:00
2019-10-03 15:36:40 -04:00
2019-05-30 11:26:32 -07:00
2019-03-18 14:44:20 +01:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-10-03 15:36:40 -04:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:29:19 -07:00
2019-04-17 16:39:43 +02:00
2019-07-10 01:40:23 +02:00
2019-07-10 01:40:23 +02:00
2019-02-21 12:00:54 +01:00
2019-02-21 12:00:54 +01:00
2019-02-21 12:00:54 +01:00
2019-06-05 17:36:37 +02:00
2019-02-21 12:00:53 +01:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-10-03 15:36:40 -04:00
2019-05-30 11:26:32 -07:00
2019-12-09 13:52:29 +01:00
2019-10-04 10:48:31 -04:00
2019-10-03 20:48:27 +02:00
2019-12-09 13:53:37 +01:00
2019-08-22 17:08:09 +02:00
2019-11-06 21:37:29 +01:00
2019-07-10 01:39:57 +02:00
2019-11-06 21:37:29 +01:00