android_kernel_sony_sdm845/drivers/input
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Arnd Bergmann 3507348a64 Input: cyapa_gen6 - fix out-of-bounds stack access
commit f051ae4f6c732c231046945b36234e977f8467c6 upstream.

gcc -Warray-bounds warns about a serious bug in
cyapa_pip_retrieve_data_structure:

drivers/input/mouse/cyapa_gen6.c: In function 'cyapa_pip_retrieve_data_structure.constprop':
include/linux/unaligned/access_ok.h:40:17: warning: array subscript -1 is outside array bounds of 'struct retrieve_data_struct_cmd[1]' [-Warray-bounds]
   40 |  *((__le16 *)p) = cpu_to_le16(val);
drivers/input/mouse/cyapa_gen6.c:569:13: note: while referencing 'cmd'
  569 |  } __packed cmd;
      |             ^~~

Apparently the '-2' was added to the pointer instead of the value,
writing garbage into the stack next to this variable.

Fixes: c2c06c41f7 ("Input: cyapa - add gen6 device module support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20201026161332.3708389-1-arnd@kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-29 13:45:02 +01:00
..
gameport
joystick Input: xpad - support Ardwiino Controllers 2020-12-11 13:37:58 +01:00
keyboard Input: cros_ec_keyb - send 'scancodes' in addition to key events 2020-12-29 13:45:02 +01:00
misc Input: cm109 - do not stomp on control URB 2020-12-29 13:44:47 +01:00
mouse Input: cyapa_gen6 - fix out-of-bounds stack access 2020-12-29 13:45:02 +01:00
rmi4 Input: synaptics-rmi4 - fix error return code in rmi_driver_probe() 2020-06-03 08:16:39 +02:00
serio Input: i8042 - add Acer laptops to the i8042 reset list 2020-12-29 13:44:47 +01:00
tablet Input: pegasus_notetaker - fix endpoint sanity check 2020-01-29 10:24:39 +01:00
touchscreen Input: goodix - add upside-down quirk for Teclast X98 Pro tablet 2020-12-29 13:45:02 +01:00
apm-power.c
evbug.c
evdev.c Input: evdev - call input_flush_device() on release(), not flush() 2020-06-03 08:16:38 +02:00
ff-core.c
ff-memless.c Input: ff-memless - kill timer in destroy() 2019-11-25 09:51:55 +01:00
input-compat.c drivers/input: eliminate INPUT_COMPAT_TEST macro 2016-03-25 16:37:42 -07:00
input-compat.h drivers/input: eliminate INPUT_COMPAT_TEST macro 2016-03-25 16:37:42 -07:00
input-leds.c Input: leds - fix out of bound access 2018-05-09 09:50:20 +02:00
input-mt.c Input: update input_mt_report_pointer_emulation to support hovering 2016-06-01 14:21:10 -07:00
input-polldev.c
input.c Input: add safety guards to input_set_keycode() 2020-01-14 20:04:27 +01:00
joydev.c Input: joydev - recognize devices with Z axis as joysticks 2016-09-26 20:03:06 -07:00
Kconfig Input: synaptics-rmi4 - add support for Synaptics RMI4 devices 2016-03-10 16:02:39 -08:00
Makefile Input: synaptics-rmi4 - add support for Synaptics RMI4 devices 2016-03-10 16:02:39 -08:00
matrix-keymap.c
mousedev.c Input: mousedev - fix implicit conversion warning 2018-04-08 12:12:43 +02:00
sparse-keymap.c