opnsense-src/sys/dev/uart
Mark Johnston 4a9a41650c uart: Fix an out-of-bounds read in ns8250_bus_probe()
The problem is that ns8250_bus_probe() accesses a field from the
ns8250_softc, which embeds the generic UART softc, but the ns8250_softc
hasn't yet been allocated because we're still probing.

This is a regression from commit 0aefb0a63c.  This fixed a problem
where one of the upper four IER bits, which are usually reserved, needs
to be set in order to get RX interrupts before the RX FIFO is full.  At
the same time, we avoid clearing those reserved bits (see commit
58957d8717, though other UART drivers I looked at do not bother with
this).

So, copy what ns8250_init() does to disable interrupts, since we don't
know what the "right" mask is at this point.

Reported by:	syzbot+f256beefd0df9eb796e7@syzkaller.appspotmail.com
Reviewed by:	imp
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D31124
2021-07-13 17:49:39 -04:00
..
uart.h scc(4)/uart(4): Remove obsolete support for Siemens SAB 82532 2020-12-26 13:48:06 +01:00
uart_bus.h Export a sysctl count of RX FIFO overrun events. 2020-04-13 20:59:09 +00:00
uart_bus_acpi.c uart: clean up empty lines in .c and .h files 2020-09-01 21:50:00 +00:00
uart_bus_fdt.c uart: allow UART_DEV_DBGPORT for fdt consoles 2020-12-02 21:01:52 +00:00
uart_bus_isa.c Regularize my copyright notice 2019-12-04 16:56:11 +00:00
uart_bus_pci.c Add support for Gemini Lake LPSS UARTs. 2021-05-23 20:46:32 +03:00
uart_bus_puc.c Regularize my copyright notice 2019-12-04 16:56:11 +00:00
uart_bus_scc.c scc(4)/uart(4): Remove obsolete support for Siemens SAB 82532 2020-12-26 13:48:06 +01:00
uart_core.c Export a sysctl count of RX FIFO overrun events. 2020-04-13 20:59:09 +00:00
uart_cpu.h
uart_cpu_acpi.c Fix AccessWidth and BitWidth parsing in SPCR table 2020-06-24 12:15:27 +00:00
uart_cpu_acpi.h Use ACPI SPCR on x86 2019-05-23 19:55:53 +00:00
uart_cpu_arm64.c uart: allow UART_DEV_DBGPORT for fdt consoles 2020-12-02 21:01:52 +00:00
uart_cpu_fdt.c uart: allow UART_DEV_DBGPORT for fdt consoles 2020-12-02 21:01:52 +00:00
uart_cpu_fdt.h uart: allow UART_DEV_DBGPORT for fdt consoles 2020-12-02 21:01:52 +00:00
uart_cpu_powerpc.c uart: clean up empty lines in .c and .h files 2020-09-01 21:50:00 +00:00
uart_cpu_x86.c Use ACPI SPCR on x86 2019-05-23 19:55:53 +00:00
uart_dbg.c
uart_dev_imx.c Add i.MX 8M Quad support 2020-07-01 00:33:16 +00:00
uart_dev_imx.h uart: clean up empty lines in .c and .h files 2020-09-01 21:50:00 +00:00
uart_dev_lowrisc.c Add support for the UART device found in lowRISC system-on-a-chip. 2018-10-12 15:19:41 +00:00
uart_dev_lowrisc.h Add support for the UART device found in lowRISC system-on-a-chip. 2018-10-12 15:19:41 +00:00
uart_dev_msm.c
uart_dev_msm.h
uart_dev_mu.c uart: clean up empty lines in .c and .h files 2020-09-01 21:50:00 +00:00
uart_dev_mvebu.c uart: clean up empty lines in .c and .h files 2020-09-01 21:50:00 +00:00
uart_dev_ns8250.c uart: Fix an out-of-bounds read in ns8250_bus_probe() 2021-07-13 17:49:39 -04:00
uart_dev_ns8250.h uart: clean up empty lines in .c and .h files 2020-09-01 21:50:00 +00:00
uart_dev_pl011.c uart: clean up empty lines in .c and .h files 2020-09-01 21:50:00 +00:00
uart_dev_quicc.c uart: clean up empty lines in .c and .h files 2020-09-01 21:50:00 +00:00
uart_dev_snps.c Remove "all rights reserved" from copyright for the file that Jared McNeill 2019-12-03 21:05:33 +00:00
uart_dev_ti8250.c Move Ti AM335x to dev/extres/clk framework. 2020-07-30 14:45:05 +00:00
uart_dev_z8530.c
uart_if.m
uart_ppstypes.h
uart_subr.c uart: Improve console specification parsing 2021-01-14 17:47:04 -07:00
uart_tty.c Some devices take undesired actions when RTS and DTR are 2019-06-12 18:07:04 +00:00