linux-stable/drivers
Alan Stern d9d4b1e46d HID: Fix assumption that devices have inputs
The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff
driver.  The problem is caused by the driver's assumption that the
device must have an input report.  While this will be true for all
normal HID input devices, a suitably malicious device can violate the
assumption.

The same assumption is present in over a dozen other HID drivers.
This patch fixes them by checking that the list of hid_inputs for the
hid_device is nonempty before allowing it to be used.

Reported-and-tested-by: syzbot+403741a091bf41d4ae79@syzkaller.appspotmail.com
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: <stable@vger.kernel.org>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-10-03 15:36:40 -04:00
..
accessibility
acpi libnvdimm for 5.4 2019-09-21 10:55:29 -07:00
amba ARM updates for 5.4-rc1: 2019-09-22 09:39:09 -07:00
android
ata
atm
auxdisplay
base
bcma
block
bluetooth
bus ARM: SoC: late updates for v5.4 2019-09-20 15:53:02 -07:00
cdrom
char Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-09-23 09:31:42 -07:00
clk Main MIPS changes for v5.4: 2019-09-22 09:30:30 -07:00
clocksource Main MIPS changes for v5.4: 2019-09-22 09:30:30 -07:00
connector
counter
cpufreq
cpuidle
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-09-23 09:31:42 -07:00
dax
dca
devfreq
dio
dma Main MIPS changes for v5.4: 2019-09-22 09:30:30 -07:00
dma-buf
edac ARM updates for 5.4-rc1: 2019-09-22 09:39:09 -07:00
eisa
extcon
firewire
firmware firmware: bcm47xx_nvram: _really_ correct size_t printf format 2019-09-22 11:31:15 -07:00
fpga
fsi
gnss
gpio
gpu hmm related patches for 5.4 2019-09-21 10:07:42 -07:00
greybus
hid HID: Fix assumption that devices have inputs 2019-10-03 15:36:40 -04:00
hsi HSI changes for the 5.4 series 2019-09-22 12:02:21 -07:00
hv
hwmon Main MIPS changes for v5.4: 2019-09-22 09:30:30 -07:00
hwspinlock
hwtracing
i2c
i3c
ide
idle
iio
infiniband RDMA subsystem updates for 5.4 2019-09-21 10:26:24 -07:00
input
interconnect
iommu
ipack
irqchip Main MIPS changes for v5.4: 2019-09-22 09:30:30 -07:00
isdn
leds
lightnvm
macintosh
mailbox
mcb
md - crypto and DM crypt advances that allow the crypto API to reclaim 2019-09-21 10:40:37 -07:00
media
memory
memstick
message
mfd Main MIPS changes for v5.4: 2019-09-22 09:30:30 -07:00
misc hmm related patches for 5.4 2019-09-21 10:07:42 -07:00
mmc
mtd Main MIPS changes for v5.4: 2019-09-22 09:30:30 -07:00
mux
net RDMA subsystem updates for 5.4 2019-09-21 10:26:24 -07:00
nfc
ntb
nubus
nvdimm libnvdimm for 5.4 2019-09-21 10:55:29 -07:00
nvme
nvmem
of
opp
oprofile
parisc
parport
pci powerpc updates for 5.4 2019-09-20 11:48:06 -07:00
pcmcia
perf
phy power supply and reset changes for the v5.4 series 2019-09-22 12:04:59 -07:00
pinctrl
platform
pnp
power power supply and reset changes for the v5.4 series 2019-09-22 12:04:59 -07:00
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc remoteproc updates for v5.4 2019-09-22 10:55:08 -07:00
reset
rpmsg
rtc RTC for 5.4 2019-09-22 11:05:43 -07:00
s390
sbus
scsi SCSI misc on 20190919 2019-09-21 10:50:15 -07:00
sfi
sh
siox
slimbus
soc
soundwire soundwire updates for v5.4-rc1 2019-09-22 10:52:23 -07:00
spi
spmi
ssb
staging
target SCSI misc on 20190919 2019-09-21 10:50:15 -07:00
tc
tee
thermal
thunderbolt
tty
uio
usb Modules updates for v5.4 2019-09-22 10:34:46 -07:00
vfio VFIO updates for v5.4-rc1 2019-09-20 15:06:13 -07:00
vhost
video Main MIPS changes for v5.4: 2019-09-22 09:30:30 -07:00
virt
virtio
visorbus
vlynq
vme
w1
watchdog
xen
zorro
Kconfig
Makefile