Will McVicker
77344e18cf
HID: make arrays usage and value to be the same
...
commit ed9be64eefe26d7d8b0b5b9fa3ffdf425d87a01f upstream.
The HID subsystem allows an "HID report field" to have a different
number of "values" and "usages" when it is allocated. When a field
struct is created, the size of the usage array is guaranteed to be at
least as large as the values array, but it may be larger. This leads to
a potential out-of-bounds write in
__hidinput_change_resolution_multipliers() and an out-of-bounds read in
hidinput_count_leds().
To fix this, let's make sure that both the usage and value arrays are
the same size.
Cc: stable@vger.kernel.org
Signed-off-by: Will McVicker <willmcvicker@google.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-02-26 10:12:59 +01:00
..
2020-12-26 16:02:43 +01:00
2020-10-22 12:41:00 -07:00
2020-08-25 11:13:29 -07:00
2019-08-05 14:37:15 +02:00
2019-05-30 11:26:32 -07:00
2020-09-22 11:19:55 +02:00
2020-08-17 12:17:52 +02:00
2020-03-13 17:33:11 +01:00
2020-05-06 11:40:03 +02:00
2019-05-21 10:50:45 +02:00
2019-10-03 15:36:40 -04:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2020-02-18 14:43:51 +01:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:36:37 +02:00
2021-02-26 10:12:59 +01:00
2019-05-30 11:26:32 -07:00
2020-08-17 11:38:49 +02:00
2020-08-17 11:59:09 +02:00
2019-09-03 16:52:04 +02:00
2020-10-23 13:23:44 +02:00
2020-09-09 08:47:38 +02:00
2019-10-03 15:36:40 -04:00
2020-09-01 09:11:24 +02:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:37:04 +02:00
2019-10-03 15:36:40 -04:00
2019-05-30 11:26:32 -07:00
2019-10-03 15:36:40 -04:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-08-22 17:11:58 +02:00
2020-03-18 13:36:21 +01:00
2020-03-16 14:51:05 +01:00
2019-05-30 11:26:37 -07:00
2019-05-30 11:26:32 -07:00
2019-08-05 14:18:42 +02:00
2019-05-30 11:26:32 -07:00
2019-10-03 15:36:40 -04:00
2020-09-28 08:57:28 +00:00
2019-05-30 11:26:32 -07:00
2021-01-27 11:54:59 +01:00
2021-01-27 11:54:59 +01:00
2020-10-22 13:42:34 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:37:10 +02:00
2020-07-07 12:42:27 +02:00
2019-10-03 15:36:40 -04:00
2019-10-03 15:36:40 -04:00
2019-10-03 15:36:40 -04:00
2017-11-02 11:10:55 +01:00
2020-08-23 17:36:59 -05:00
2019-08-22 09:53:08 +02:00
2017-11-02 11:10:55 +01:00
2019-10-03 15:36:40 -04:00
2021-01-27 11:54:59 +01:00
2021-01-27 11:55:02 +01:00
2020-08-17 11:38:49 +02:00
2020-06-16 17:34:14 +02:00
2019-01-14 20:11:01 +01:00
2020-11-05 11:16:53 +01:00
2019-05-30 11:26:37 -07:00
2020-09-02 12:55:46 -07:00
2019-05-30 11:26:32 -07:00
2021-01-30 13:55:17 +01:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:30:28 +02:00
2020-09-03 16:18:55 +02:00
2019-08-22 17:11:58 +02:00
2019-06-05 17:30:28 +02:00
2020-04-01 12:26:12 +02:00
2019-06-05 17:30:28 +02:00
2019-06-05 17:30:28 +02:00
2019-06-05 17:30:28 +02:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:36:37 +02:00
2019-10-01 16:21:04 +02:00
2020-11-09 12:55:18 +01:00
2018-06-25 15:23:40 +02:00
2019-05-30 11:26:32 -07:00
2020-10-23 16:16:31 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2020-10-15 20:41:43 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2020-03-11 11:58:58 +01:00
2020-11-05 11:09:28 +01:00
2019-05-30 11:26:35 -07:00
2020-05-26 11:00:49 +02:00
2019-05-30 11:26:32 -07:00
2020-06-19 09:21:21 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-10-03 15:36:40 -04:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:29:19 -07:00
2019-04-17 16:39:43 +02:00
2020-10-22 11:52:02 +02:00
2020-10-22 11:52:02 +02:00
2019-02-21 12:00:54 +01:00
2019-02-21 12:00:54 +01:00
2019-02-21 12:00:54 +01:00
2020-07-20 12:24:41 +02:00
2019-02-21 12:00:53 +01:00
2020-09-30 22:44:26 +02:00
2019-05-30 11:26:32 -07:00
2020-09-07 16:03:51 +02:00
2019-05-30 11:26:32 -07:00
2020-06-19 14:17:22 +02:00
2020-06-19 14:17:22 +02:00
2019-05-30 11:26:32 -07:00
2019-10-03 15:36:40 -04:00
2019-05-30 11:26:32 -07:00
2020-01-27 15:49:30 +01:00
2021-01-27 11:54:57 +01:00
2020-09-30 22:44:26 +02:00
2020-01-10 15:34:28 +01:00
2021-01-30 13:55:17 +01:00
2020-10-15 20:41:43 +02:00
2021-01-30 13:55:17 +01:00
2019-11-06 21:37:29 +01:00