[PATCH] pinctrl: nomadik: validate DT pin config property read and range
Linus Walleij
linusw at kernel.org
Thu Dec 3 06:12:32 PST 2026
Hi Elkin,
On Wed, Nov 25, 2026 at 11:27 PM Elkin Cruz <elkin at google.com> wrote:
> In nmk_pinctrl_dt_get_config(), of_property_read_u32() is only checked
> for (ret != -EINVAL), passing an uninitialized val to
> nmk_dt_pin_config() on other error returns. In addition, val is signed
> and nmk_dt_pin_config() returns 0 even when val is out of bounds for
> nmk_cfg_params[index].choice.
>
> Check (!ret) after of_property_read_u32(), make val unsigned (u32), and
> return -EINVAL when val >= nmk_cfg_params[index].size.
>
> Fixes: e32af8894588 ("pinctrl/nomadik: add device tree support")
> Cc: stable at vger.kernel.org
Nah it's not that urgent.
> Signed-off-by: Elkin Cruz <elkin at google.com>
Patch applied as nonurgent fix.
Yours,
Linus Walleij
More information about the linux-arm-kernel
mailing list