OpenCloudOS-Kernel/drivers/input/joystick
Tetsuo Handa b8ebf25099 Input: iforce - invert valid length check when fetching device IDs
syzbot is reporting uninitialized value at iforce_init_device() [1], for
commit 6ac0aec6b0 ("Input: iforce - allow callers supply data buffer
when fetching device IDs") is checking that valid length is shorter than
bytes to read. Since iforce_get_id_packet() stores valid length when
returning 0, the caller needs to check that valid length is longer than or
equals to bytes to read.

Reported-by: syzbot <syzbot+4dd880c1184280378821@syzkaller.appspotmail.com>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Fixes: 6ac0aec6b0 ("Input: iforce - allow callers supply data buffer when fetching device IDs")
Link: https://lore.kernel.org/r/531fb432-7396-ad37-ecba-3e42e7f56d5c@I-love.SAKURA.ne.jp
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2022-11-07 10:28:58 -08:00
..
iforce Input: iforce - invert valid length check when fetching device IDs 2022-11-07 10:28:58 -08:00
Kconfig Input: raspberrypi-ts - add missing HAS_IOMEM dependency 2022-05-31 14:10:03 -07:00
Makefile Input: add Raspberry Pi Sense HAT joystick driver 2022-04-24 18:25:02 -07:00
a3d.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
adc-joystick.c Input: adc-joystick - add polled input device support 2022-08-17 12:32:51 -07:00
adi.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
amijoy.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
analog.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
as5011.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
cobra.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
db9.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
fsia6b.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
gamecon.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
gf2k.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
grip.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
grip_mp.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
guillemot.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
interact.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
joydump.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
magellan.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
maplecontrol.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
n64joy.c Input: n64joy - fix return value check in n64joy_probe() 2021-03-09 21:41:28 -08:00
psxpad-spi.c Input: psxpad-spi - switch to using polled mode of input devices 2019-10-29 17:13:36 -07:00
pxrc.c Input: pxrc - flatten probe code 2018-07-25 19:04:19 +00:00
qwiic-joystick.c Input: add SparkFun Qwiic Joystick driver 2021-06-18 21:28:20 -07:00
sensehat-joystick.c Input: sensehat-joystick - remove unnecessary error message 2022-06-28 22:50:48 -07:00
sidewinder.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
spaceball.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
spaceorb.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
stinger.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
tmdc.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
turbografx.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
twidjoy.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
walkera0701.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
warrior.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00
xpad.c Input: xpad - add X-Box Adaptive Profile button 2022-09-28 18:31:39 -07:00
zhenhua.c input: drop empty comment blocks 2022-09-29 16:25:42 -07:00