diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2018-02-23 14:38:29 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-02-28 15:29:59 +0100 |
commit | f9f5786987e81d166c60833edcb7d1836aa16944 (patch) | |
tree | 84d9a9f89b2f4804fec664e5b0a77190567ed4ad /mm/cma.c | |
parent | 42afa627c338e22bbde06c95bd7b46f960c91f79 (diff) |
serial: arc_uart: Fix out-of-bounds access through DT alias
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: ea28fd56fcde69af ("serial/arc-uart: switch to devicetree based probing")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/cma.c')
0 files changed, 0 insertions, 0 deletions