Files
linux/drivers
Johan Korsnes 75c3955b16 HID: core: fix off-by-one memset in hid_report_raw_event()
commit 5ebdffd250 upstream.

In case a report is greater than HID_MAX_BUFFER_SIZE, it is truncated,
but the report-number byte is not correctly handled. This results in a
off-by-one in the following memset, causing a kernel Oops and ensuing
system crash.

Note: With commit 8ec321e96e ("HID: Fix slab-out-of-bounds read in
hid_field_extract") I no longer hit the kernel Oops as we instead fail
"controlled" at probe if there is a report too long in the HID
report-descriptor. hid_report_raw_event() is an exported symbol, so
presumabely we cannot always rely on this being the case.

Fixes: 966922f26c ("HID: fix a crash in hid_report_raw_event()
                     function.")
Signed-off-by: Johan Korsnes <jkorsnes@cisco.com>
Cc: Armando Visconti <armando.visconti@st.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-05 16:42:18 +01:00
..
2020-02-24 08:34:44 +01:00
2019-05-14 19:17:53 +02:00
2020-02-28 16:38:43 +01:00
2019-07-26 09:14:05 +02:00
2020-02-14 16:33:24 -05:00
2018-12-21 14:15:17 +01:00
2018-11-13 11:08:51 -08:00
2020-02-24 08:34:47 +01:00