Jiri Kosina ad3e14d7c5 HID: logitech: perform bounds checking on device_id early enough
device_index is a char type and the size of paired_dj_deivces is 7
elements, therefore proper bounds checking has to be applied to
device_index before it is used.

We are currently performing the bounds checking in
logi_dj_recv_add_djhid_device(), which is too late, as malicious device
could send REPORT_TYPE_NOTIF_DEVICE_UNPAIRED early enough and trigger the
problem in one of the report forwarding functions called from
logi_dj_raw_event().

Fix this by performing the check at the earliest possible ocasion in
logi_dj_raw_event().

Cc: stable@vger.kernel.org
Reported-by: Ben Hawkes <hawkes@google.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-08-21 10:43:06 -05:00
..
2014-08-06 20:10:32 -07:00
2014-07-23 10:18:07 -07:00
2014-07-23 00:51:30 +02:00
2014-08-06 20:07:24 -07:00
2014-07-23 17:42:37 -07:00
2014-08-06 20:06:14 -07:00
2014-08-05 21:16:46 -07:00
2014-08-04 18:36:12 -07:00
2014-08-06 20:07:24 -07:00
2014-07-25 18:00:23 -07:00
2014-07-15 20:55:15 +02:00
2014-07-30 00:23:09 +02:00
2014-08-06 20:10:32 -07:00
2014-08-06 20:10:32 -07:00
2014-08-05 16:18:13 -07:00
2014-08-06 20:10:32 -07:00
2014-08-06 20:10:32 -07:00
2014-07-13 15:26:47 -07:00
2014-08-06 20:10:32 -07:00
2014-08-04 18:34:04 -07:00