mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
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> |
||
|---|---|---|
| .. | ||
| iforce-ff.c | ||
| iforce-main.c | ||
| iforce-packets.c | ||
| iforce-serio.c | ||
| iforce-usb.c | ||
| iforce.h | ||
| Kconfig | ||
| Makefile | ||