linux-stable/drivers/pinctrl/nuvoton
Mikhail Kobuk 6c18c386fd pinctrl: nuvoton: wpcm450: fix out of bounds write
[ Upstream commit 87d315a341 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-10-19 23:08:52 +02:00
..
Kconfig
Makefile
pinctrl-npcm7xx.c pinctrl: npcm7xx: Add missing check for ioremap 2023-07-19 16:21:37 +02:00
pinctrl-wpcm450.c pinctrl: nuvoton: wpcm450: fix out of bounds write 2023-10-19 23:08:52 +02:00