android_kernel_sony_sdm845/drivers/input/mouse
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
..
alps.c Input: ALPS - fix TrackStick detection on Thinkpad L570 and Latitude 7370 2018-04-08 12:12:58 +02:00
alps.h Input: ALPS - fix multi-touch decoding on SS4 plus touchpads 2018-01-23 19:57:07 +01:00
amimouse.c
appletouch.c
atarimouse.c
bcm5974.c
byd.c
byd.h
cyapa.c
cyapa.h
cyapa_gen3.c
cyapa_gen5.c
cyapa_gen6.c Input: cyapa_gen6 - fix out-of-bounds stack access 2020-12-29 13:45:02 +01:00
cypress_ps2.c
cypress_ps2.h
elan_i2c.h Input: elan_i2c_smbus - fix more potential stack buffer overflows 2018-07-03 11:23:17 +02:00
elan_i2c_core.c Input: elan_i2c - add id for touchpad found in Lenovo s21e-20 2019-03-13 14:05:01 -07:00
elan_i2c_i2c.c Input: elan_i2c - clear INT before resetting controller 2018-04-13 19:48:06 +02:00
elan_i2c_smbus.c Input: elan_i2c_smbus - fix more potential stack buffer overflows 2018-07-03 11:23:17 +02:00
elantech.c Input: elantech - enable middle button support on 2 ThinkPads 2019-07-21 09:05:50 +02:00
elantech.h
focaltech.c
focaltech.h
gpio_mouse.c
hgpk.c
hgpk.h
inport.c
Kconfig
lifebook.c
lifebook.h
logibm.c
logips2pp.c
logips2pp.h
Makefile
maplemouse.c
navpoint.c
pc110pad.c
psmouse-base.c Input: psmouse - add a newline when printing 'proto' by sysfs 2020-08-26 10:29:04 +02:00
psmouse.h
pxa930_trkball.c
rpcmouse.c
sentelic.c Input: sentelic - fix error return when fsp_reg_write fails 2020-08-21 11:02:10 +02:00
sentelic.h
sermouse.c
synaptics.c
synaptics.h
synaptics_i2c.c
synaptics_usb.c
touchkit_ps2.c
touchkit_ps2.h
trackpoint.c Input: trackpoint - force 3 buttons if 0 button is reported 2018-01-31 12:55:53 +01:00
trackpoint.h Input: psmouse - fix build error of multiple definition 2019-08-25 10:51:51 +02:00
vmmouse.c
vmmouse.h
vsxxxaa.c