linux/drivers/input/joystick/iforce
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-ff.c Input: iforce - remove empty multiline comments 2019-07-15 09:43:13 -07:00
iforce-main.c Input: iforce - invert valid length check when fetching device IDs 2022-11-07 10:28:58 -08:00
iforce-packets.c Input: iforce - remove empty multiline comments 2019-07-15 09:43:13 -07:00
iforce-serio.c Input: iforce - wake up after clearing IFORCE_XMIT_RUNNING flag 2022-08-27 20:54:06 -07:00
iforce-usb.c Input: iforce - wake up after clearing IFORCE_XMIT_RUNNING flag 2022-08-27 20:54:06 -07:00
iforce.h Input: iforce - wake up after clearing IFORCE_XMIT_RUNNING flag 2022-08-27 20:54:06 -07:00
Kconfig Linux 5.2 2019-07-15 09:42:32 -07:00
Makefile Linux 5.2 2019-07-15 09:42:32 -07:00