Re: [PATCH 6/9] serial: samsung: Fix out-of-bounds access through DT alias

2018-02-20 Thread Geert Uytterhoeven
On Tue, Feb 20, 2018 at 10:40 AM, Geert Uytterhoeven wrote: > The s3c24xx_serial_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 sy

[PATCH 6/9] serial: samsung: Fix out-of-bounds access through DT alias

2018-02-20 Thread Geert Uytterhoeven
The s3c24xx_serial_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_SAMSUNG_UARTS), so this can even be triggered using