kernel_samsung_a53x/drivers/input
Dmitry Torokhov 6241b53ea9 Input: uinput - reject requests with unreasonable number of slots
[ Upstream commit 206f533a0a7c683982af473079c4111f4a0f9f5e ]

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>

When exercising uinput interface syzkaller may try setting up device
with a really large number of slots, which causes memory allocation
failure in input_mt_init_slots(). While this allocation failure is
handled properly and request is rejected, it results in syzkaller
reports. Additionally, such request may put undue burden on the
system which will try to free a lot of memory for a bogus request.

Fix it by limiting allowed number of slots to 100. This can easily
be extended if we see devices that can track more than 100 contacts.

Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reported-by: syzbot <syzbot+0122fa359a69694395d5@syzkaller.appspotmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=0122fa359a69694395d5
Link: https://lore.kernel.org/r/Zqgi7NYEbpRsJfa2@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-01-19 00:09:59 +01:00
..
gameport
input_boost
joystick Input: xpad - add Razer Wolverine V2 support 2024-11-18 12:12:17 +01:00
keyboard Revert "Input: adp5589-keys - fix adp5589_gpio_get_value()" 2024-11-24 00:23:01 +01:00
misc Input: uinput - reject requests with unreasonable number of slots 2025-01-19 00:09:59 +01:00
mouse Revert "Input: synaptics - enable SMBus for HP Elitebook 840 G2" 2024-11-24 00:23:35 +01:00
rmi4 Revert "Input: synaptics-rmi4 - fix UAF of IRQ domain on driver removal" 2024-11-24 00:22:59 +01:00
sec_input drivers: sec_input: stm_cmd.c: Expand snprintf sizes 2024-12-17 21:43:20 +01:00
serio Revert "Input: i8042 - add Fujitsu Lifebook E756 to i8042 quirk table" 2024-11-24 00:23:35 +01:00
tablet
touchscreen Revert "Input: ads7846 - ratelimit the spi_sync error message" 2024-11-24 00:23:35 +01:00
apm-power.c
evbug.c
evdev.c
ff-core.c Input: ff-core - prefer struct_size over open coded arithmetic 2024-11-19 14:19:40 +01:00
ff-memless.c
input-compat.c
input-compat.h
input-leds.c
input-mt.c Input: MT - limit max slots 2024-11-23 23:20:50 +01:00
input-polldev.c
input-poller.c
input-poller.h
input.c Input: try trimming too long modalias strings 2024-11-19 14:19:02 +01:00
joydev.c
Kconfig
Makefile
matrix-keymap.c
mousedev.c
sparse-keymap.c