summaryrefslogtreecommitdiff
path: root/lib/debugobjects.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2018-02-23 14:38:34 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-30 07:47:43 +0200
commit580bcda86523d6384ffc596e2cf3c13aad233361 (patch)
tree8c326020b22e4df4ee8f7f8fb491e8b839820ccf /lib/debugobjects.c
parent8984c7441dc8f1c3ea0ea182a861f8e7f4d704e8 (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 'lib/debugobjects.c')
0 files changed, 0 insertions, 0 deletions