Gustavo A. R. Silva
8a7bfa3d97
char: hpet: Fix out-of-bounds read bug
...
[ Upstream commit 98c49f1746ac44ccc164e914b9a44183fad09f51 ]
Currently, there is an out-of-bounds read on array hpetp->hp_dev
in the following for loop:
870 for (i = 0; i < hdp->hd_nirqs; i++)
871 hpetp->hp_dev[i].hd_hdwirq = hdp->hd_irq[i];
This is due to the recent change from one-element array to
flexible-array member in struct hpets:
104 struct hpets {
...
113 struct hpet_dev hp_dev[];
114 };
This change affected the total size of the dynamic memory
allocation, decreasing it by one time the size of struct hpet_dev.
Fix this by adjusting the allocation size when calling
struct_size().
Fixes: 987f028b8637c ("char: hpet: Use flexible-array member")
Signed-off-by: Gustavo A. R. Silva <[email protected] >
Signed-off-by: Tetsuo Handa <[email protected] >
Acked-by: Eric Biggers <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected] >
Signed-off-by: Sasha Levin <[email protected] >
2020-02-24 08:36:59 +01:00
..
agp
ia64: remove support for machvecs
2019-08-16 14:32:26 -07:00
hw_random
hwrng: omap3-rom - Fix missing clock by probing with device tree
2020-01-26 10:01:03 +01:00
ipmi
drivers: ipmi: fix off-by-one bounds check that leads to a out-of-bounds write
2020-02-19 19:53:05 +01:00
mwave
treewide: Add SPDX license identifier - Makefile/Kconfig
2019-05-21 10:50:46 +02:00
pcmcia
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 18
2019-05-21 11:28:46 +02:00
tpm
tpm: Handle negative priv->response_len in tpm_common_read()
2020-01-14 20:08:21 +01:00
xilinx_hwicap
treewide: Add SPDX license identifier - Makefile/Kconfig
2019-05-21 10:50:46 +02:00
xillybus
PCI: Move ASPM declarations to linux/pci.h
2019-08-28 08:28:39 -05:00
adi.c
apm-emulation.c
treewide: Add SPDX license identifier for more missed files
2019-05-21 10:50:45 +02:00
applicom.c
treewide: Add SPDX license identifier for more missed files
2019-05-21 10:50:45 +02:00
applicom.h
bsr.c
Merge 5.2-rc4 into char-misc-next
2019-06-09 09:11:21 +02:00
ds1620.c
treewide: Add SPDX license identifier for more missed files
2019-05-21 10:50:45 +02:00
dsp56k.c
dtlk.c
treewide: Add SPDX license identifier for more missed files
2019-05-21 10:50:45 +02:00
efirtc.c
treewide: Add SPDX license identifier for more missed files
2019-05-21 10:50:45 +02:00
hangcheck-timer.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 405
2019-06-05 17:37:13 +02:00
hpet.c
char: hpet: Fix out-of-bounds read bug
2020-02-24 08:36:59 +01:00
Kconfig
ia64 for v5.4 - big change here is removal of support for SGI Altix
2019-09-16 15:32:01 -07:00
lp.c
lp: fix sparc64 LPSETTIMEOUT ioctl
2019-12-13 08:42:17 +01:00
Makefile
char: remove the SGI tiocx/mbcs driver
2019-08-16 11:33:56 -07:00
mem.c
Merge branch 'next-lockdown' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
2019-09-28 08:14:15 -07:00
misc.c
char: misc: Move EXPORT_SYMBOL immediately next to the functions/varibles
2019-05-24 18:00:41 +02:00
mspec.c
char/mspec: remove SGI SN2 support
2019-08-16 11:33:56 -07:00
nsc_gpio.c
treewide: Add SPDX license identifier for more missed files
2019-05-21 10:50:45 +02:00
nvram.c
treewide: Add SPDX license identifier for more missed files
2019-05-21 10:50:45 +02:00
nwbutton.c
treewide: Add SPDX license identifier for more missed files
2019-05-21 10:50:45 +02:00
nwbutton.h
nwflash.c
treewide: Add SPDX license identifier for more missed files
2019-05-21 10:50:45 +02:00
pc8736x_gpio.c
treewide: Add SPDX license identifier for more missed files
2019-05-21 10:50:45 +02:00
powernv-op-panel.c
treewide: Add SPDX license identifier for more missed files
2019-05-21 10:50:45 +02:00
ppdev.c
ppdev: fix PPGETTIME/PPSETTIME ioctls
2019-12-17 19:56:41 +01:00
ps3flash.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 164
2019-05-30 11:26:38 -07:00
random.c
char/random: silence a lockdep splat with printk()
2020-02-24 08:36:26 +01:00
raw.c
treewide: Add SPDX license identifier for more missed files
2019-05-21 10:50:45 +02:00
rtc.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152
2019-05-30 11:26:32 -07:00
scx200_gpio.c
treewide: Add SPDX license identifier for more missed files
2019-05-21 10:50:45 +02:00
sonypi.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61
2019-05-24 17:36:45 +02:00
tb0219.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156
2019-05-30 11:26:35 -07:00
tlclk.c
toshiba.c
toshiba: Add correct printk log level while emitting error log
2019-09-04 13:42:43 +02:00
ttyprintk.c
ttyprintk: fix a potential deadlock in interrupt context issue
2020-02-05 21:22:41 +00:00
uv_mmtimer.c
virtio_console.c
virtio_console: allocate inbufs in add_port() only if it is needed
2019-11-19 05:13:49 -05:00