diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2018-02-23 14:38:37 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-05-30 07:47:43 +0200 |
commit | 8984c7441dc8f1c3ea0ea182a861f8e7f4d704e8 (patch) | |
tree | bba1cba5564d88d51769502cb2c03b16afc76d04 /lib/debugobjects.c | |
parent | 75d852e568ed75f214d80ff0abc3e80cdb118625 (diff) |
serial: xuartps: Fix out-of-bounds access through DT alias
[ Upstream commit e7d75e18d0fc3f7193b65282b651f980c778d935 ]
The cdns_uart_port[] 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.
Fixes: 928e9263492069ee ("tty: xuartps: Initialize ports according to aliases")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/debugobjects.c')
0 files changed, 0 insertions, 0 deletions