linux-uconsole/drivers/tty
Geert Uytterhoeven f28308185e serial: arc_uart: Fix out-of-bounds access through DT alias
[ Upstream commit f9f5786987 ]

The arc_uart_ports[] array is indexed using a value derived from the
"serialN" alias in DT, which may lead to an out-of-bounds access.

Fix this by adding a range check.

Note that the array size is defined by a Kconfig symbol
(CONFIG_SERIAL_ARC_NR_PORTS), so this can even be triggered using a
legitimate DTB.

Fixes: ea28fd56fc ("serial/arc-uart: switch to devicetree based probing")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-30 07:49:15 +02:00
..
hvc tty: hvc_xen: hide xen_console_remove when unused 2018-02-25 11:03:46 +01:00
ipwireless
serial serial: arc_uart: Fix out-of-bounds access through DT alias 2018-05-30 07:49:15 +02:00
vt vt: change SGR 21 to follow the standards 2018-04-08 11:52:01 +02:00
amiserial.c
bfin_jtag_comm.c
cyclades.c
ehv_bytechan.c
goldfish.c Revert "tty: goldfish: Fix a parameter of a call to free_irq" 2017-10-21 17:09:06 +02:00
isicom.c
Kconfig tty: cyclades: cyz_interrupt is only used for PCI 2018-02-25 11:03:48 +01:00
Makefile
metag_da.c
mips_ejtag_fdc.c
moxa.c
moxa.h
mxser.c
mxser.h
n_gsm.c tty: n_gsm: Fix DLCI handling for ADM mode if debug & 2 is not set 2018-05-02 07:53:40 -07:00
n_hdlc.c tty: n_hdlc: get rid of racy n_hdlc.tbuf 2017-03-15 09:57:10 +08:00
n_r3964.c
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c tty: make n_tty_read() always abort if hangup is in progress 2018-04-24 09:32:04 +02:00
nozomi.c tty: nozomi: avoid a harmless gcc warning 2017-04-30 05:49:27 +02:00
pty.c tty: pty: Fix ldisc flush after userspace become aware of the data already 2017-05-20 14:27:02 +02:00
rocket.c
rocket.h
rocket_int.h
synclink.c
synclink_gt.c
synclinkmp.c
sysrq.c sysrq: Fix warning in sysrq generated crash. 2018-01-17 09:35:28 +01:00
tty_audit.c tty: audit: Fix audit source 2015-11-20 16:19:54 -08:00
tty_buffer.c tty: fix __tty_insert_flip_char regression 2017-09-27 11:00:13 +02:00
tty_io.c tty: Don't call panic() at tty_ldisc_init() 2018-05-02 07:53:40 -07:00
tty_ioctl.c
tty_ldisc.c tty: Use __GFP_NOFAIL for tty_ldisc_get() 2018-05-02 07:53:41 -07:00
tty_ldsem.c
tty_mutex.c tty: Drop krefs for interrupted tty lock 2017-06-14 13:16:26 +02:00
tty_port.c