WSL2-Linux-Kernel/drivers/input
Tetsuo Handa 95f73d01f5 Input: MT - limit max slots
commit 99d3bf5f7377d42f8be60a6b9cb60fb0be34dceb upstream.

syzbot is reporting too large allocation at input_mt_init_slots(), for
num_slots is supplied from userspace using ioctl(UI_DEV_CREATE).

Since nobody knows possible max slots, this patch chose 1024.

Reported-by: syzbot <syzbot+0122fa359a69694395d5@syzkaller.appspotmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=0122fa359a69694395d5
Suggested-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: George Kennedy <george.kennedy@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-09-04 13:23:37 +02:00
..
gameport bus: Make remove callback return void 2021-07-21 11:53:42 +02:00
joystick Input: xpad - add Lenovo Legion Go controllers 2024-03-01 13:21:45 +01:00
keyboard Input: qt1050 - handle CHIP_ID reading error 2024-08-19 05:45:05 +02:00
misc Input: pm8xxx-vibrator - correct VIB_MAX_LEVELS calculation 2024-06-16 13:39:42 +02:00
mouse Input: elan_i2c - do not leave interrupt disabled on suspend failure 2024-08-19 05:45:05 +02:00
rmi4 Input: synaptics-rmi4 - fail probing if memory allocation for "phys" fails 2024-04-13 13:01:44 +02:00
serio Input: i8042 - add Ayaneo Kun to i8042 quirk table 2024-07-27 10:46:11 +02:00
tablet Input: aiptek - properly check endpoint type 2022-03-23 09:16:43 +01:00
touchscreen Input: silead - Always support 10 fingers 2024-07-27 10:46:08 +02:00
Kconfig um: allow disabling NO_IOMEM 2021-06-17 21:44:50 +02:00
Makefile Input: touchscreen - move helper functions to core 2021-03-25 11:14:09 -07:00
apm-power.c
evbug.c Input: evbug - remove an empty comment block 2021-05-24 21:06:39 -07:00
evdev.c Input: evdev - per-client waitgroups 2020-10-06 18:34:15 -07:00
ff-core.c Input: ff-core - prefer struct_size over open coded arithmetic 2024-07-18 13:07:28 +02:00
ff-memless.c
input-compat.c
input-compat.h
input-leds.c
input-mt.c Input: MT - limit max slots 2024-09-04 13:23:37 +02:00
input-poller.c Input: use input_device_enabled() 2020-12-02 22:10:33 -08:00
input-poller.h
input.c Input: try trimming too long modalias strings 2024-07-05 09:14:15 +02:00
joydev.c Input: joydev - prevent use of not validated data in JSIOCSBTNMAP ioctl 2021-07-04 23:02:10 -07:00
matrix-keymap.c
mousedev.c
sparse-keymap.c
touchscreen.c Input: touchscreen - avoid bitwise vs logical OR warning 2021-10-15 22:22:54 -07:00