linux/drivers/input/joystick/iforce
Pengpeng Hou 5751c781d3 Input: iforce - validate input packet lengths
iforce_process_packet() reads fixed fields from joystick, wheel and
status packets without first checking their lengths. In particular, the
shared hats-and-buttons helper unconditionally reads data[6]. The status
tail is a sequence of 16-bit effect addresses, but an incomplete final
address is also consumed. A successful zero-length USB URB additionally
reads the packet ID before the common parser is called.

Reject the zero-length USB transfer, require the seven-byte joystick and
wheel prefixes and the two-byte status prefix, and consume only complete
status-tail addresses.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260720115018.75045-1-pengpeng@iscas.ac.cn
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-07-24 20:49:53 -07:00
..
iforce-ff.c Input: iforce - use guard notation when acquiring mutex and spinlock 2024-10-03 09:07:31 -07:00
iforce-main.c Input: include export.h in modules using EXPORT_SYMBOL*() 2025-08-21 12:00:59 -07:00
iforce-packets.c Input: iforce - validate input packet lengths 2026-07-24 20:49:53 -07:00
iforce-serio.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
iforce-usb.c Input: iforce - validate input packet lengths 2026-07-24 20:49:53 -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