linux/drivers/pinctrl/nuvoton
Mikhail Kobuk 87d315a341 pinctrl: nuvoton: wpcm450: fix out of bounds write
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: a1d1e0e3d8 ("pinctrl: nuvoton: Add driver for WPCM450")
Signed-off-by: Mikhail Kobuk <m.kobuk@ispras.ru>
Reviewed-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Link: https://lore.kernel.org/r/20230825101532.6624-1-m.kobuk@ispras.ru
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2023-09-12 09:03:18 +02:00
..
Kconfig pinctrl: wpcm450: select MFD_SYSCON 2023-04-21 10:21:44 +02:00
Makefile pinctrl: nuvoton: Add driver for WPCM450 2022-03-15 01:16:20 +01:00
pinctrl-npcm7xx.c pinctrl: npcm7xx: Add missing check for ioremap 2023-06-09 09:42:52 +02:00
pinctrl-wpcm450.c pinctrl: nuvoton: wpcm450: fix out of bounds write 2023-09-12 09:03:18 +02:00