Re: [PATCH] pinctrl: freescale: Fix a memory out of bounds when num_configs is 1

From: andy . shevchenko
Date: Tue May 02 2023 - 11:28:07 EST


Mon, May 01, 2023 at 10:41:39PM +0800, Xiaolei Wang kirjoitti:
> The config passed in by pad wakeup is 1, When num_configs is 1,
> configs[1] should not be obtained, which will generate the
> following memory out-of-bounds situation:

> BUG: KASAN: stack out of bounds in imx_pinconf_set_scu+0x9c/0x160
> Read size 8 at address ffff8000104c7558 by task sh/664
> CPU: 3 PID: 664 Communication: sh Tainted: G WC 6.1.20 #1
> Hardware name: Freescale i.MX8QM MEK (DT)
> Call trace:

Please, read this
https://kernel.org/doc/html/latest/process/submitting-patches.html#backtraces-in-commit-messages
and update accordingly.

--
With Best Regards,
Andy Shevchenko