linux_dsm_epyc7002/drivers/input
Vince Kim a2c714e8cb Input: cyttsp4 - avoid overflows when calculating memory sizes
There are several places to perform subtraction to calculate buffer
size such as:

si->si_ofs.cydata_size = si->si_ofs.test_ofs - si->si_ofs.cydata_ofs;
...
p = krealloc(si->si_ptrs.cydata, si->si_ofs.cydata_size, GFP_KERNEL);

Actually, data types of above variables during subtraction are size_t, so
it is unsigned. That means if second operand(si->si_ofs.cydata_ofs) is
greater than the first operand(si->si_ofs.test_ofs), then resulting
si->si_ofs.cydata_size could result in an unsigned integer wrap which is
not desirable.

The proper way to correct this problem is to perform a test of both
operands to avoid having unsigned wrap.

Signed-off-by: Vince Kim <vince.k.kim@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-11-03 12:45:22 -07:00
..
gameport
joystick Immutable branch between MFD and many other subsystems due for the v4.14 merge window 2017-09-21 16:38:09 -07:00
keyboard Input: keyboard - convert timers to use timer_setup() 2017-10-24 10:04:44 -07:00
misc Input: uinput - fold header into the driver proper 2017-10-23 16:32:31 -07:00
mouse Input: alps - convert to using timer_setup() 2017-10-23 16:31:50 -07:00
rmi4 Input: synaptics-rmi4 - make array rmi_f54_report_type_names static 2017-10-09 20:53:36 -07:00
serio Input: ps2-gpio - actually abort probe when connected to sleeping GPIOs 2017-10-24 10:10:11 -07:00
tablet
touchscreen Input: cyttsp4 - avoid overflows when calculating memory sizes 2017-11-03 12:45:22 -07:00
apm-power.c
evbug.c
evdev.c
ff-core.c Input: uinput - avoid FF flush when destroying device 2017-09-21 16:31:22 -07:00
ff-memless.c Input: ff_memless - convert to using timer_setup() 2017-10-23 16:31:52 -07:00
input-compat.c
input-compat.h
input-leds.c
input-mt.c
input-polldev.c
input.c Input: allow matching device IDs on property bits 2017-10-19 16:54:49 -07:00
joydev.c Input: joydev - blacklist ds3/ds4/udraw motion sensors 2017-10-19 16:55:39 -07:00
Kconfig
Makefile
matrix-keymap.c
mousedev.c
sparse-keymap.c