Commit e382b694 authored by Antonio Borneo's avatar Antonio Borneo Committed by Greg Kroah-Hartman
Browse files

pinctrl: stm32: fix array read out of bound



commit edd48fd9 upstream.

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: default avatarAntonio Borneo <antonio.borneo@foss.st.com>
Fixes: 32c170ff ("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: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 62d33b9e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment