linux/drivers/hid
Seth Forshee 0704fea9b2 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:43:23 -08:00
..
i2c-hid HID: i2c-hid: Limit reads to wMaxInputLength bytes for input events 2015-03-06 14:43:23 -08:00
usbhid HID: Add a new id 0x501a for Genius MousePen i608X 2015-01-16 06:59:31 -08:00
Kconfig Merge branches 'for-3.13/upstream-fixes', 'for-3.14/i2c-hid', 'for-3.14/sensor-hub', 'for-3.14/sony' and 'for-3.14/upstream' into for-linus 2014-01-22 15:40:14 +01:00
Makefile HID: roccat: add support for Ryos MK keyboards 2013-10-30 14:17:31 +01:00
hid-a4tech.c HID: trivial devm conversion for special hid drivers 2013-07-31 10:12:28 +02:00
hid-apple.c HID: apple: add Apple wireless keyboard 2011 JIS model support 2014-02-06 14:35:18 +01:00
hid-appleir.c HID: appleir: force input to be set 2013-11-21 09:58:19 +01: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-11-12 19:06:23 +01: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:34:12 -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:31 -08:00
hid-cypress.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-debug.c HID: debug: add labels for some new buttons 2013-12-17 13:54:40 +01: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-elo.c HID: hid-elo: some systems cannot stomach work around 2013-09-25 11:28:50 +02: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-holtek-mouse.c HID: hid-holtek-mouse: add new a070 mouse 2014-01-16 22:58:43 +01:00
hid-holtekff.c HID: hid-holtekff: don't push static constants on stack for %*ph 2013-08-05 11:29:57 +02:00
hid-huion.c HID: add support for Huion 580 tablet 2013-05-28 14:29:38 +02:00
hid-hyperv.c HID: hyperv: make sure input buffer is big enough 2014-02-17 21:18:35 +01: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:31 -08:00
hid-input.c HID: add battery quirk for USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO keyboard 2015-01-16 06:59:31 -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:31 -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: remove usb dependency 2013-09-24 11:47:47 +02:00
hid-lg.c HID: fix a couple of off-by-ones 2014-09-05 16:34:12 -07:00
hid-lg.h HID: hid-lg4ff: Adjust X axis input value accordingly to selected range. 2012-09-25 15:41:02 +02:00
hid-lg2ff.c HID: logitech - lg2ff: Add IDs for Formula Vibration Feedback Wheel 2013-10-09 12:06:02 +02:00
hid-lg3ff.c HID: LG: validate HID output report details 2013-09-13 15:12:39 +02:00
hid-lg4ff.c HID: hid-lg4ff: Support new version of G27 2014-03-14 15:43:34 +01:00
hid-lgff.c HID: LG: validate HID output report details 2013-09-13 15:12:39 +02:00
hid-logitech-dj.c HID: logitech-dj: prevent false errors to be shown 2014-10-05 14:52:12 -07:00
hid-logitech-dj.h HID: logitech-dj: prevent false errors to be shown 2014-10-05 14:52:12 -07:00
hid-magicmouse.c HID: magicmouse: sanity check report size in raw_event() callback 2014-10-05 14:52:11 -07:00
hid-microsoft.c Revert "HID: microsoft: Add ID's for Surface Type/Touch Cover 2" 2014-05-31 13:20:29 -07:00
hid-monterey.c HID: fix a couple of off-by-ones 2014-09-05 16:34:12 -07:00
hid-multitouch.c HID: multitouch: add FocalTech FTxxxx support 2014-01-28 20:49:32 +01:00
hid-ntrig.c HID: ntrig: validate feature report details 2013-09-04 12:00:23 +02: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:34:12 -07: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-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-02 13:36:50 +02:00
hid-picolcd_core.c HID: picolcd: sanity check report size in raw_event() callback 2014-10-05 14:52:11 -07:00
hid-picolcd_debugfs.c HID: fix data access in implement() 2013-07-22 16:16:40 +02:00
hid-picolcd_fb.c HID: picolcd: Prevent NULL pointer dereference on _remove() 2013-09-02 13:36:50 +02: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-pl.c HID: pantherlord: validate output report details 2013-09-04 11:58:32 +02: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-roccat-arvo.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2013-09-06 09:30:36 -07:00
hid-roccat-arvo.h HID: roccat: correction and cleanup of HID feature reports 2011-06-13 12:52:57 +02:00
hid-roccat-common.c HID: roccat: generalize some common code 2013-10-30 14:17:31 +01:00
hid-roccat-common.h HID: roccat: generalize some common code 2013-10-30 14:17:31 +01:00
hid-roccat-isku.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2013-09-06 09:30:36 -07: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: Fix "cannot create duplicate filename" problems 2013-09-30 10:51:31 +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: Fix "cannot create duplicate filename" problems 2013-09-30 10:51:31 +02:00
hid-roccat-koneplus.h HID: roccat: fix wrong attr size for koneplus tcu 2012-11-18 22:58:28 +01:00
hid-roccat-konepure.c HID: roccat: generalize some common code 2013-10-30 14:17:31 +01:00
hid-roccat-kovaplus.c HID: roccat: fix Coverity CID 141438 2013-11-04 10:55:20 +01:00
hid-roccat-kovaplus.h HID: roccat: deprecate some Kovaplus attributes 2012-11-12 15:30:29 +01:00
hid-roccat-lua.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-roccat-lua.h HID: roccat: add support for Roccat Lua 2012-10-17 10:44:47 +02:00
hid-roccat-pyra.c HID: roccat: potential out of bounds in pyra_sysfs_write_settings() 2015-01-16 06:59:31 -08:00
hid-roccat-pyra.h HID: roccat: deprecated some Pyra attributes 2012-11-12 15:30:28 +01:00
hid-roccat-ryos.c HID: roccat: add support for Ryos MK keyboards 2013-10-30 14:17:31 +01:00
hid-roccat-savu.c HID: roccat: generalize some common code 2013-10-30 14:17:31 +01:00
hid-roccat-savu.h HID: roccat: generalize some common code 2013-10-30 14:17:31 +01:00
hid-roccat.c HID: roccat: check cdev_add return value 2013-06-18 11:00:36 +02: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: quirk for STM Sensor hub 2014-02-17 15:05:02 +01: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 HID: sony: Fix work queue issues. 2014-02-20 14:14:03 +01:00
hid-speedlink.c HID: Fix Speedlink VAD Cezanne support for some devices 2013-08-26 13:51:10 +02:00
hid-steelseries.c HID: steelseries: validate output report details 2013-09-13 15:12:28 +02:00
hid-sunplus.c HID: fix a couple of off-by-ones 2014-09-05 16:34:12 -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: wacom: Intuos4 battery charging changes 2013-07-04 15:04:47 +02:00
hid-waltop.c HID: Use module_hid_driver macro 2013-01-03 10:27:31 +01:00
hid-wiimote-core.c Revert "HID: wiimote: add LEGO-wiimote VID" 2013-11-19 11:28:03 +01:00
hid-wiimote-debug.c HID: wiimote: fix DRM debug-attr to correctly parse input 2013-06-03 11:07:06 +02:00
hid-wiimote-modules.c HID: wiimote: add pro-controller analog stick calibration 2013-10-30 14:13:29 +01:00
hid-wiimote.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2013-11-15 16:48:22 -08:00
hid-xinmo.c HID: use module_hid_driver() to simplify the code 2013-08-26 13:23:04 +02:00
hid-zpff.c HID: zeroplus: validate output report details 2013-09-13 15:11:34 +02:00
hid-zydacron.c HID: trivial devm conversion for special hid drivers 2013-07-31 10:12:28 +02:00
hidraw.c HID: hidraw: fix warning destroying hidraw device files after parent 2014-02-26 11:01:28 +01:00
uhid.c HID: uhid: fix leak for 64/32 UHID_CREATE 2013-11-27 10:53:49 +01:00