Marc Zyngier
936d9293b6
HID: core: Sanitize event code and type when mapping input
...
commit 35556bed836f8dc07ac55f69c8d17dce3e7f0e25 upstream.
When calling into hid_map_usage(), the passed event code is
blindly stored as is, even if it doesn't fit in the associated bitmap.
This event code can come from a variety of sources, including devices
masquerading as input devices, only a bit more "programmable".
Instead of taking the event code at face value, check that it actually
fits the corresponding bitmap, and if it doesn't:
- spit out a warning so that we know which device is acting up
- NULLify the bitmap pointer so that we catch unexpected uses
Code paths that can make use of untrusted inputs can now check
that the mapping was indeed correct and bail out if not.
Cc: stable@vger.kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org >
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Signed-off-by: Lee Jones <lee.jones@linaro.org >
Change-Id: Ida234c943583d8b0274e1eff8bf419ba18978191
CVE-2020-0465
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org >
2021-05-11 10:50:54 +02:00
..
2020-12-09 16:01:42 +01:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:22:45 +02:00
2019-08-02 15:14:10 +02:00
2019-08-08 15:00:19 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-09 09:14:19 +02:00
2019-08-09 09:13:49 +02:00
2019-08-09 09:14:12 +02:00
2019-08-02 15:14:10 +02:00
2019-08-06 11:41:21 +02:00
2019-08-06 11:41:21 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2020-09-23 17:28:13 +02:00
2020-09-23 18:05:04 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-06 11:41:21 +02:00
2019-08-02 15:14:10 +02:00
2019-08-06 11:41:21 +02:00
2019-08-06 11:41:21 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:22:29 +02:00
2019-08-05 14:20:47 +02:00
2014-10-30 22:27:18 -07:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-23 13:20:00 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-08 15:09:54 +02:00
2020-09-23 18:05:05 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:21:54 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2020-12-12 22:45:54 +01:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:22:44 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2020-09-23 17:28:13 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-06 10:44:47 +02:00
2019-08-06 11:41:21 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2020-08-08 14:52:26 +02:00
2015-08-31 11:08:11 -07:00
2014-08-18 10:34:41 -07:00
2019-08-08 12:19:52 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-08 15:09:54 +02:00
2019-08-02 15:14:10 +02:00
2019-08-06 12:31:21 +02:00
2019-08-02 15:14:10 +02:00
2020-09-23 17:37:32 +02:00
2019-08-08 15:08:49 +02:00
2019-08-05 14:21:58 +02:00
2014-07-10 14:09:27 -07:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-06 11:41:21 +02:00
2019-08-02 15:14:10 +02:00
2021-02-07 08:50:39 +01:00
2019-08-06 12:26:38 +02:00
2019-08-08 15:28:37 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-06 10:44:15 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-08 12:42:04 +02:00
2021-05-11 10:50:54 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-06 12:26:30 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2020-08-08 16:42:50 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 09:12:32 +02:00
2019-08-05 14:20:47 +02:00
2019-08-06 11:41:21 +02:00
2020-08-08 16:42:41 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2020-03-07 17:53:58 +01:00
2019-08-02 15:14:10 +02:00
2020-08-08 16:42:41 +02:00
2015-09-15 15:39:48 +05:30
2019-08-05 14:20:47 +02:00
2020-09-23 17:28:13 +02:00
2020-08-08 16:42:40 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2020-09-23 17:38:55 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-06 12:31:22 +02:00
2020-09-23 17:28:13 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-06 10:41:58 +02:00
2019-08-05 14:20:47 +02:00
2019-08-08 12:42:04 +02:00
2015-06-30 12:52:32 +05:30
2019-08-05 14:22:45 +02:00
2019-08-05 14:20:47 +02:00
2019-08-06 10:44:38 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2020-09-23 18:05:05 +02:00
2020-09-23 17:38:52 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2014-09-24 12:31:25 +05:30
2019-08-02 15:14:10 +02:00
2021-01-03 21:26:49 +01:00
2020-09-23 18:05:05 +02:00
2019-08-05 14:20:47 +02:00
2020-09-23 18:05:05 +02:00
2019-08-06 11:41:21 +02:00
2020-11-16 18:32:29 +01:00
2019-08-05 14:20:47 +02:00
2019-08-06 10:44:40 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2015-09-13 06:52:56 -07:00
2015-09-08 17:05:31 +05:30
2019-08-02 15:14:10 +02:00
2014-05-26 14:03:44 +03:00
2016-01-05 17:20:05 +05:30
2014-11-11 14:48:15 +05:30
2014-08-13 14:35:04 +05:30
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-06 10:44:34 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-09 09:14:03 +02:00
2019-08-09 09:13:53 +02:00
2019-08-09 09:14:03 +02:00
2019-08-09 09:13:49 +02:00
2020-09-23 17:28:13 +02:00
2019-08-05 14:20:47 +02:00
2020-09-23 17:28:13 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-08 15:08:48 +02:00
2019-08-06 11:41:21 +02:00
2019-08-05 14:20:47 +02:00
2019-08-08 12:09:23 +02:00
2020-09-23 18:05:05 +02:00
2019-08-06 08:16:29 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 09:12:33 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2020-03-07 14:01:44 +01:00
2014-06-22 16:43:52 +03:00
2015-09-11 14:44:24 +05:30
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-06 11:41:21 +02:00
2019-08-06 11:41:21 +02:00
2019-08-06 11:41:21 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2020-09-23 17:32:09 +02:00
2020-09-23 17:32:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-08 15:08:07 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 09:13:24 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:22:31 +02:00
2014-07-10 14:09:27 -07:00
2015-06-08 03:45:59 -07:00
2020-09-23 17:28:13 +02:00
2020-09-23 17:32:07 +02:00
2019-08-08 15:09:49 +02:00
2019-08-05 14:20:47 +02:00
2019-08-08 12:42:04 +02:00
2014-07-21 21:46:54 +05:30
2014-07-21 21:46:54 +05:30
2014-07-21 21:44:54 +05:30
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2015-09-15 15:39:48 +05:30
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-08 15:08:49 +02:00
2019-08-02 15:14:10 +02:00
2019-08-06 11:41:21 +02:00
2020-09-23 18:05:05 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:22:41 +02:00
2019-08-02 15:14:10 +02:00
2020-12-10 21:34:01 +01:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2021-02-07 08:50:52 +01:00
2020-09-23 17:37:32 +02:00
2019-08-08 12:09:25 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 09:13:25 +02:00
2020-05-20 09:44:20 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-09 12:04:49 +02:00
2019-08-05 09:12:31 +02:00
2019-08-05 14:20:47 +02:00
2014-07-22 14:33:44 -06:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2020-09-23 17:28:13 +02:00
2019-08-08 12:09:30 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2020-09-23 18:05:05 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2014-11-13 14:53:50 +05:30
2020-12-10 21:34:01 +01:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-06 12:24:29 +02:00
2020-12-12 21:36:55 +01:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-06 12:26:30 +02:00
2019-08-05 14:20:47 +02:00
2020-12-12 21:36:54 +01:00
2019-08-08 15:08:48 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2020-03-07 14:01:44 +01:00
2015-09-11 14:44:24 +05:30
2015-09-11 14:44:24 +05:30
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2020-09-23 18:05:05 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-08 15:00:18 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-04 19:49:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2020-09-23 17:32:06 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-06 08:16:29 +02:00
2019-08-06 08:16:29 +02:00
2019-08-06 08:17:38 +02:00