mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 17:02:17 +00:00
syzbot is reporting uninitialized value at iforce_init_device() [1], for commit6ac0aec6b0("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 <[email protected]> Signed-off-by: Tetsuo Handa <[email protected]> Fixes:6ac0aec6b0("Input: iforce - allow callers supply data buffer when fetching device IDs") Link: https://lore.kernel.org/r/[email protected] Cc: [email protected] Signed-off-by: Dmitry Torokhov <[email protected]>