diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2018-02-23 14:38:34 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-05-25 16:13:14 +0200 |
commit | 2803df3004f05ed6649e01cbf16224be0c845494 (patch) | |
tree | ffd789efafb9938aed5fc217c3b5d65fcf073b5d /scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h | |
parent | 4cb84bd8720ebe445d0ef8976307b78894b93262 (diff) |
serial: samsung: Fix out-of-bounds access through serial port index
[ Upstream commit 49ee23b71877831ac087d6083f6f397dc19c9664 ]
The s3c24xx_serial_ports[] array is indexed using a value derived from
the "serialN" alias in DT, or from an incrementing probe index, 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_SAMSUNG_UARTS), so this can even be triggered using
a legitimate DTB or legitimate board code.
Fixes: 13a9f6c64fdc55eb ("serial: samsung: Consider DT alias when probing ports")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h')
0 files changed, 0 insertions, 0 deletions