T.J. Mercier
cac61b58a3
HID: playstation: Clamp num_touch_reports
...
A device would never lie about the number of touch reports would it?
If it does the loop in dualshock4_parse_report will read off the end of
the touch_reports array, up to about 2 KiB for the maximum number of 256
loop iteraions. The data that is read is emitted via evdev if the
DS4_TOUCH_POINT_INACTIVE bit happens to be set. Protect against this by
clamping the num_touch_reports value provided by the device to the
maximum size of the touch_reports array.
Fixes: 7520382488 ("HID: playstation: add DualShock4 touchpad support.")
Cc: stable@vger.kernel.org
Reported-by: Xingyu Jin <xingyuj@google.com >
Signed-off-by: T.J. Mercier <tjmercier@google.com >
Signed-off-by: Jiri Kosina <jkosina@suse.com >
2026-05-12 17:54:48 +02:00
..
2026-04-15 08:45:00 -07:00
2026-04-14 16:48:56 -07:00
2026-04-15 12:59:16 -07:00
2026-04-15 15:03:01 -07:00
2026-03-27 09:54:31 +01:00
2026-04-15 14:27:51 -07:00
2026-04-15 12:59:16 -07:00
2026-04-13 09:19:42 -04:00
2026-04-16 20:34:34 -07:00
2026-04-15 12:59:16 -07:00
2026-04-17 08:53:23 -07:00
2026-03-20 13:36:32 +01:00
2026-04-15 12:59:16 -07:00
2026-03-22 15:59:22 +09:00
2026-04-17 09:43:12 -07:00
2026-04-14 17:10:15 -07:00
2026-04-15 15:22:26 -07:00
2026-03-19 15:12:40 -07:00
2026-04-05 13:53:18 -07:00
2026-04-04 03:15:39 +09:00
2026-04-17 10:29:01 -07:00
2026-04-17 11:12:42 -07:00
2026-04-12 08:27:34 -07:00
2026-04-14 15:32:39 -07:00
2026-04-16 20:34:34 -07:00
2026-04-10 11:21:06 -03:00
2026-04-02 14:30:40 +02:00
2026-04-16 20:34:34 -07:00
2026-04-15 12:59:16 -07:00
2026-05-12 17:54:48 +02:00
2026-04-15 12:59:16 -07:00
2026-04-15 14:37:32 -07:00
2026-04-15 12:59:16 -07:00
2026-04-17 09:43:12 -07:00
2026-04-15 14:37:32 -07:00
2026-04-16 21:15:56 -07:00
2026-04-17 08:53:23 -07:00
2026-04-17 11:12:42 -07:00
2026-04-17 07:18:03 -07:00
2026-04-15 15:11:05 -07:00
2026-04-15 08:32:10 -07:00
2026-04-17 11:12:42 -07:00
2026-04-16 20:34:34 -07:00
2026-04-15 14:41:21 -07:00
2026-04-10 10:29:58 +02:00
2026-04-17 08:53:23 -07:00
2026-04-16 21:15:56 -07:00
2026-04-13 20:10:58 -07:00
2026-04-15 14:41:21 -07:00
2026-04-13 10:40:26 -07:00
2026-04-13 16:22:30 -07:00
2026-04-02 16:44:40 +02:00
2026-04-17 11:12:42 -07:00
2026-04-15 14:41:21 -07:00
2026-03-27 10:18:39 -05:00
2026-04-14 16:48:56 -07:00
2026-04-17 10:22:08 -07:00
2026-04-17 08:53:23 -07:00
2026-04-15 14:10:40 -07:00
2026-04-08 12:01:37 +02:00
2026-04-16 08:11:01 -07:00
2026-04-01 16:03:05 +02:00
2026-03-17 19:06:19 -07:00
2026-04-15 14:13:31 -07:00
2026-04-15 14:32:12 -07:00
2026-04-14 16:48:56 -07:00
2026-04-17 08:53:23 -07:00
2026-04-04 19:14:58 +02:00
2026-04-13 19:03:11 -07:00
2026-04-14 18:36:10 -07:00
2026-03-17 20:30:57 +01:00
2026-04-16 20:34:34 -07:00
2026-04-17 10:16:53 -07:00
2026-04-17 09:43:12 -07:00
2026-04-15 12:59:16 -07:00
2026-04-15 12:59:16 -07:00
2026-04-16 20:34:34 -07:00
2026-04-14 08:55:18 -07:00
2026-04-15 15:16:39 -07:00
2026-04-05 13:53:44 -07:00
2026-04-07 13:35:44 +02:00
2026-04-04 00:47:50 +02:00
2026-04-16 08:01:16 -07:00
2026-04-15 08:45:00 -07:00
2026-04-17 07:18:03 -07:00
2026-04-15 12:59:16 -07:00
2026-04-07 21:06:59 +02:00
2026-04-17 11:12:42 -07:00