Re: [PATCH] pinctrl: nuvoton: wpcm450: fix out of bounds write

From: Linus Walleij
Date: Tue Sep 12 2023 - 03:04:26 EST


On Fri, Aug 25, 2023 at 12:15 PM Mikhail Kobuk <m.kobuk@xxxxxxxxx> wrote:

> Write into 'pctrl->gpio_bank' happens before the check for GPIO index
> validity, so out of bounds write may happen.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: a1d1e0e3d80a ("pinctrl: nuvoton: Add driver for WPCM450")
> Signed-off-by: Mikhail Kobuk <m.kobuk@xxxxxxxxx>
> Reviewed-by: Alexey Khoroshilov <khoroshilov@xxxxxxxxx>

Patch applied for fixes.

Yours,
Linus Walleij