diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2018-02-23 14:38:31 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-05-30 07:47:43 +0200 |
commit | 3f7945cbd3b5585842e66deda18f8e927fff66d2 (patch) | |
tree | edfb2af2929e447513ab7c0a4ba19351d81fbb16 /lib/debugobjects.c | |
parent | 580bcda86523d6384ffc596e2cf3c13aad233361 (diff) |
serial: imx: Fix out-of-bounds access through serial port index
[ Upstream commit 5673444821406dda5fc25e4b52aca419f8065a19 ]
The imx_ports[] array is indexed using a value derived from the
"serialN" alias in DT, or from platform data, which may lead to an
out-of-bounds access.
Fix this by adding a range check.
Fixes: ff05967a07225ab6 ("serial/imx: add of_alias_get_id() reference back")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
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