linux-stable/drivers/pinctrl/stm32
Antonio Borneo a9659016f9 pinctrl: stm32: fix array read out of bound
[ Upstream commit edd48fd9d4 ]

The existing code does not verify if the "tentative" index exceeds
the size of the array, causing out of bound read.
Issue identified with kasan.

Check the index before using it.

Signed-off-by: Antonio Borneo <antonio.borneo@foss.st.com>
Fixes: 32c170ff15 ("pinctrl: stm32: set default gpio line names using pin names")
Link: https://lore.kernel.org/r/20231107110520.4449-1-antonio.borneo@foss.st.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-08 08:52:21 +01:00
..
Kconfig pinctrl: stm32: add stm32mp257 pinctrl support 2023-06-08 16:01:29 +02:00
Makefile pinctrl: stm32: add stm32mp257 pinctrl support 2023-06-08 16:01:29 +02:00
pinctrl-stm32.c pinctrl: stm32: fix array read out of bound 2023-12-08 08:52:21 +01:00
pinctrl-stm32.h pinctrl: stm32: add stm32mp257 pinctrl support 2023-06-08 16:01:29 +02:00
pinctrl-stm32f429.c
pinctrl-stm32f469.c
pinctrl-stm32f746.c
pinctrl-stm32f769.c
pinctrl-stm32h743.c
pinctrl-stm32mp135.c pinctrl: stm32: prevent the use of the secure protected pins 2022-05-05 00:04:04 +02:00
pinctrl-stm32mp157.c pinctrl: stm32: improve bank clocks management 2022-05-01 23:25:58 +02:00
pinctrl-stm32mp257.c pinctrl: stm32: add stm32mp257 pinctrl support 2023-06-08 16:01:29 +02:00