OrangePi_CM5/drivers/input/joystick
Tetsuo Handa 24cc679abb Input: iforce - invert valid length check when fetching device IDs
commit b8ebf250997c5fb253582f42bfe98673801ebebd upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-11-25 17:45:52 +01:00
..
iforce Input: iforce - invert valid length check when fetching device IDs 2022-11-25 17:45:52 +01:00
Kconfig
…
Makefile
…
a3d.c
…
adc-joystick.c
…
adi.c
…
amijoy.c
…
analog.c
…
as5011.c
…
cobra.c
…
db9.c
…
fsia6b.c
…
gamecon.c
…
gf2k.c
…
grip.c
…
grip_mp.c
…
guillemot.c
…
interact.c
…
joydump.c
…
magellan.c
…
maplecontrol.c
…
psxpad-spi.c
…
pxrc.c
…
sidewinder.c
…
spaceball.c Input: spaceball - fix parsing of movement data packets 2022-01-05 12:40:33 +01:00
spaceorb.c
…
stinger.c
…
tmdc.c
…
turbografx.c
…
twidjoy.c
…
walkera0701.c
…
warrior.c
…
xpad.c Input: xpad - fix wireless 360 controller breaking after suspend 2022-10-15 07:55:56 +02:00
zhenhua.c
…