linux/drivers/hid
Seth Forshee de13322c28 HID: i2c-hid: Limit reads to wMaxInputLength bytes for input events
commit 6d00f37e49 upstream.

d1c7e29e8d (HID: i2c-hid: prevent buffer overflow in early IRQ)
changed hid_get_input() to read ihid->bufsize bytes, which can be
more than wMaxInputLength. This is the case with the Dell XPS 13
9343, and it is causing events to be missed. In some cases the
missed events are releases, which can cause the cursor to jump or
freeze, among other problems. Limit the number of bytes read to
min(wMaxInputLength, ihid->bufsize) to prevent such problems.

Fixes: d1c7e29e8d "HID: i2c-hid: prevent buffer overflow in early IRQ"
Signed-off-by: Seth Forshee <seth.forshee@canonical.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>
2015-03-06 14:40:48 -08:00
..
i2c-hid HID: i2c-hid: Limit reads to wMaxInputLength bytes for input events 2015-03-06 14:40:48 -08:00
usbhid HID: Add a new id 0x501a for Genius MousePen i608X 2015-01-16 06:59:01 -08:00
hid-a4tech.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-apple.c HID: apple: option to swap the 'Option' ("Alt") and 'Command' ("Flag") keys. 2013-12-04 10:57:34 -08:00
hid-appleir.c HID: appleir: add support for Apple ir devices 2013-04-18 19:06:20 -07:00
hid-aureal.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-axff.c HID: enable Mayflash USB Gamecube Adapter 2013-12-04 10:57:34 -08:00
hid-belkin.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-cherry.c HID: fix a couple of off-by-ones 2014-09-05 16:28:34 -07:00
hid-chicony.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-core.c HID: Add a new id 0x501a for Genius MousePen i608X 2015-01-16 06:59:01 -08:00
hid-cypress.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-debug.c HID: debug: fix RCU preemption issue 2013-05-06 13:07:33 +02:00
hid-dr.c HID: use hid_hw_request() instead of direct call to usbhid 2013-02-25 13:26:41 +01:00
hid-elecom.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-emsff.c HID: use hid_hw_request() instead of direct call to usbhid 2013-02-25 13:26:41 +01:00
hid-ezkey.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-gaff.c HID: use hid_hw_request() instead of direct call to usbhid 2013-02-25 13:26:41 +01:00
hid-generic.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-gyration.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-holtek-kbd.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-holtekff.c HID: use hid_hw_request() instead of direct call to usbhid 2013-02-25 13:26:41 +01:00
hid-hyperv.c Drivers: hid: hid-hyperv: Use consolidated GUID definitions 2013-01-25 11:17:31 -08:00
hid-icade.c HID: icade: u16 which never < 0 2013-04-24 16:32:27 +02:00
hid-ids.h HID: Add a new id 0x501a for Genius MousePen i608X 2015-01-16 06:59:01 -08:00
hid-input.c HID: add battery quirk for USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO keyboard 2015-01-16 06:59:01 -08:00
hid-kensington.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-keytouch.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-kye.c HID: Add a new id 0x501a for Genius MousePen i608X 2015-01-16 06:59:01 -08:00
hid-lcpower.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-lenovo-tpkbd.c HID: lenovo-tpkbd: validate output report details 2013-10-01 09:17:46 -07:00
hid-lg.c HID: fix a couple of off-by-ones 2014-09-05 16:28:34 -07:00
hid-lg.h
hid-lg2ff.c HID: logitech - lg2ff: Add IDs for Formula Vibration Feedback Wheel 2013-12-04 10:57:19 -08:00
hid-lg3ff.c HID: LG: validate HID output report details 2013-10-01 09:17:46 -07:00
hid-lg4ff.c HID:hid-lg4ff: Initialize device properties before we touch autocentering. 2013-12-04 10:57:20 -08:00
hid-lgff.c HID: LG: validate HID output report details 2013-10-01 09:17:46 -07:00
hid-logitech-dj.c HID: logitech-dj: prevent false errors to be shown 2014-10-05 14:54:08 -07:00
hid-logitech-dj.h HID: logitech-dj: prevent false errors to be shown 2014-10-05 14:54:08 -07:00
hid-magicmouse.c HID: magicmouse: sanity check report size in raw_event() callback 2014-10-05 14:54:08 -07:00
hid-microsoft.c HID: Add PID for Japanese version of NE4K keyboard 2013-04-29 10:16:55 +02:00
hid-monterey.c HID: fix a couple of off-by-ones 2014-09-05 16:28:34 -07:00
hid-multitouch.c HID: multicouh: add PID VID to support 1 new Wistron optical touch device 2013-12-04 10:57:20 -08:00
hid-ntrig.c HID: ntrig: validate feature report details 2013-09-26 17:18:16 -07:00
hid-ortek.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-petalynx.c HID: fix a couple of off-by-ones 2014-09-05 16:28:34 -07:00
hid-picolcd_backlight.c HID: use hid_hw_request() instead of direct call to usbhid 2013-02-25 13:26:41 +01:00
hid-picolcd_cir.c HID: picolcd: Prevent NULL pointer dereference on _remove() 2013-09-26 17:18:16 -07:00
hid-picolcd_core.c HID: picolcd: sanity check report size in raw_event() callback 2014-10-05 14:54:08 -07:00
hid-picolcd_debugfs.c HID: fix data access in implement() 2013-10-13 16:08:28 -07:00
hid-picolcd_fb.c HID: picolcd: Prevent NULL pointer dereference on _remove() 2013-09-26 17:18:16 -07:00
hid-picolcd_lcd.c HID: use hid_hw_request() instead of direct call to usbhid 2013-02-25 13:26:41 +01:00
hid-picolcd_leds.c HID: use hid_hw_request() instead of direct call to usbhid 2013-02-25 13:26:41 +01:00
hid-picolcd.h Merge branches 'for-3.10/multitouch', 'for-3.10/roccat' and 'for-3.10/upstream' into for-linus 2013-04-30 10:19:07 +02:00
hid-pl.c HID: pantherlord: validate output report details 2013-09-26 17:18:15 -07:00
hid-primax.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-prodikeys.c HID: use hid_hw_request() instead of direct call to usbhid 2013-02-25 13:26:41 +01:00
hid-ps3remote.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-roccat-arvo.c
hid-roccat-arvo.h
hid-roccat-common.c HID: roccat: add new device return value 2013-12-04 10:57:34 -08:00
hid-roccat-common.h
hid-roccat-isku.c HID: roccat: add support for IskuFX 2013-03-14 11:50:49 +01:00
hid-roccat-isku.h HID: roccat: add support for IskuFX 2013-03-14 11:50:49 +01:00
hid-roccat-kone.c HID: roccat: added media key support for Kone 2013-04-08 10:33:13 +02:00
hid-roccat-kone.h HID: roccat: added media key support for Kone 2013-04-08 10:33:13 +02:00
hid-roccat-koneplus.c
hid-roccat-koneplus.h
hid-roccat-konepure.c HID: roccat: add support for KonePureOptical v2 2013-10-13 16:08:35 -07:00
hid-roccat-konepure.h HID: roccat: add support for Roccat Kone Pure gaming mouse 2013-03-14 11:50:49 +01:00
hid-roccat-kovaplus.c HID: roccat: fix Coverity CID 141438 2013-12-04 10:57:34 -08:00
hid-roccat-kovaplus.h
hid-roccat-lua.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-roccat-lua.h
hid-roccat-pyra.c HID: roccat: potential out of bounds in pyra_sysfs_write_settings() 2015-01-16 06:59:01 -08:00
hid-roccat-pyra.h
hid-roccat-savu.c
hid-roccat-savu.h
hid-roccat.c HID: roccat: fix comments on chardevice 2013-03-14 11:50:49 +01:00
hid-saitek.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-samsung.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-sensor-hub.c HID: hid-sensor-hub: fix report size 2013-12-04 10:57:19 -08:00
hid-sjoy.c HID: use hid_hw_request() instead of direct call to usbhid 2013-02-25 13:26:41 +01:00
hid-sony.c Merge branches 'for-3.9/sony' and 'for-3.9/steelseries' into for-linus 2013-02-21 10:45:52 +01:00
hid-speedlink.c HID: Fix Speedlink VAD Cezanne support for some devices 2013-09-26 17:18:16 -07:00
hid-steelseries.c HID: steelseries: validate output report details 2013-10-01 09:17:46 -07:00
hid-sunplus.c HID: fix a couple of off-by-ones 2014-09-05 16:28:34 -07:00
hid-thingm.c HID: Kconfig: Remove explicit transport layer dependencies 2013-02-25 13:26:40 +01:00
hid-tivo.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-tmff.c HID: use hid_hw_request() instead of direct call to usbhid 2013-02-25 13:26:41 +01:00
hid-topseed.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-twinhan.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-uclogic.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-wacom.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-waltop.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-wiimote-core.c HID: wiimote: parse reduced status reports 2013-04-04 09:38:43 +02:00
hid-wiimote-debug.c HID: Fix uninitialized variable "size" in hid-wiimote-debug 2013-01-18 10:59:24 +01:00
hid-wiimote-ext.c HID: wiimote: fix nunchuck button parser 2013-02-18 10:41:52 +01:00
hid-wiimote.h
hid-zpff.c HID: zeroplus: validate output report details 2013-10-01 09:17:46 -07:00
hid-zydacron.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hidraw.c HID: hidraw: correctly deallocate memory on device disconnect 2013-09-26 17:18:17 -07:00
Kconfig HID: multicouh: add PID VID to support 1 new Wistron optical touch device 2013-12-04 10:57:20 -08:00
Makefile Merge branches 'for-3.10/multitouch', 'for-3.10/roccat' and 'for-3.10/upstream' into for-linus 2013-04-30 10:19:07 +02:00
uhid.c HID: uhid: fix leak for 64/32 UHID_CREATE 2013-12-04 10:57:15 -08:00