]> git.itanic.dy.fi Git - linux-stable/commitdiff
serial: 8250: 8250_omap: Fix possible array out of bounds access
authorVignesh Raghavendra <vigneshr@ti.com>
Wed, 11 Nov 2020 11:26:52 +0000 (16:56 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Sep 2021 06:49:01 +0000 (08:49 +0200)
commit d4548b14dd7e5c698f81ce23ce7b69a896373b45 upstream.

k3_soc_devices array is missing a sentinel entry which may result in out
of bounds access as reported by kernel KASAN.

Fix this by adding a sentinel entry.

Fixes: 439c7183e5b9 ("serial: 8250: 8250_omap: Disable RX interrupt after DMA enable")
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Link: https://lore.kernel.org/r/20201111112653.2710-1-vigneshr@ti.com
Signed-off-by: Nobuhiro Iwamatsu (CIP) <nobuhiro1.iwamatsu@toshiba.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_omap.c

index 95e2d6de4f2134e30dfcd43e931d27f37d52616c..ad0549dac7d792356b2d6338ba628b42a177ba59 100644 (file)
@@ -1211,6 +1211,7 @@ static int omap8250_no_handle_irq(struct uart_port *port)
 static const struct soc_device_attribute k3_soc_devices[] = {
        { .family = "AM65X",  },
        { .family = "J721E", .revision = "SR1.0" },
+       { /* sentinel */ }
 };
 
 static struct omap8250_dma_params am654_dma = {