irqchip/stm32-exti: Prevent illegal read due to unbounded DT value
authorAntonio Borneo <antonio.borneo@foss.st.com>
Mon, 6 Jun 2022 16:27:54 +0000 (18:27 +0200)
committerMarc Zyngier <maz@kernel.org>
Thu, 7 Jul 2022 08:07:44 +0000 (09:07 +0100)
commitc16ae609214e835692c33b1a090b5a15bf1b9e7e
treeacf785333a960d4539c5ea2873f38a73d6f44829
parentf8b3eb4245113c8a9156d5db8e80c6134127bcc1
irqchip/stm32-exti: Prevent illegal read due to unbounded DT value

The value hwirq is received from DT. If it exceeds the maximum
valid value it causes the code to address unexisting irq chips
reading outside the array boundary.

Check the value of hwirq before using it.

Signed-off-by: Antonio Borneo <antonio.borneo@foss.st.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220606162757.415354-4-antonio.borneo@foss.st.com
drivers/irqchip/irq-stm32-exti.c