twx-linux/drivers/input
Tetsuo Handa 8f04edd554 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-08-29 17:33:59 +02:00
..
gameport Input: gameport - add ISA and HAS_IOPORT dependencies 2023-07-05 17:32:34 -07:00
joystick Input: xpad - add support for ASUS ROG RAIKIRI PRO 2024-07-25 09:50:49 +02:00
keyboard Input: qt1050 - handle CHIP_ID reading error 2024-08-03 08:53:58 +02:00
misc Input: pm8xxx-vibrator - correct VIB_MAX_LEVELS calculation 2024-06-12 11:12:37 +02:00
mouse Revert "Input: bcm5974 - check endpoint type before starting traffic" 2024-08-19 06:04:31 +02:00
rmi4 Input: synaptics-rmi4 - fail probing if memory allocation for "phys" fails 2024-04-13 13:07:33 +02:00
serio Input: i8042 - use new forcenorestore quirk to replace old buggy quirk combination 2024-08-29 17:33:53 +02:00
tablet Input: pegasus-notetaker - check pipe type when probing 2023-04-09 19:19:14 -07:00
tests Input: tests - add test to cover all input_grab_device() function 2023-05-23 14:50:28 -07:00
touchscreen Input: ads7846 - use spi_device_id table 2024-07-25 09:50:50 +02:00
apm-power.c
evbug.c
evdev.c
ff-core.c Input: ff-core - prefer struct_size over open coded arithmetic 2024-07-11 12:49:06 +02:00
ff-memless.c
input-compat.c
input-compat.h
input-core-private.h
input-leds.c
input-mt.c Input: MT - limit max slots 2024-08-29 17:33:59 +02:00
input-poller.c
input-poller.h
input.c Input: try trimming too long modalias strings 2024-06-12 11:11:18 +02:00
joydev.c
Kconfig Input: tests - modular KUnit tests should not depend on KUNIT=y 2023-05-02 10:39:00 -07:00
Makefile Input: Add KUnit tests for some of the input core helper functions 2023-04-01 22:47:04 -07:00
matrix-keymap.c
mousedev.c
sparse-keymap.c
touchscreen.c
vivaldi-fmap.c