summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-kye.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2014-08-21 09:57:17 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-09-05 16:34:12 -0700
commitb165b85cb5359d7d223b6d4fa645302891c44013 (patch)
tree9bd70f9a9c0ad683440468a88845f4885c357e1b /drivers/hid/hid-kye.c
parent90805fe951b65eb938f9ffaf232454a96a0cfbab (diff)
HID: logitech: perform bounds checking on device_id early enough
commit ad3e14d7c5268c2e24477c6ef54bbdf88add5d36 upstream. 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(). Reported-by: Ben Hawkes <hawkes@google.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hid/hid-kye.c')
0 files changed, 0 insertions, 0 deletions