Re: [PATCH 09/10] pinctrl: sunplus: Validate pin_func index in sppctl_dt_node_to_map()
From: Andrew Gaylard
Date: Thu Nov 12 2026 - 01:31:23 EST
Lee Jones <lee@xxxxxxxxxx> writes:
> In sppctl_dt_node_to_map(), the validation loop checks that pin_num is
> within sppctl_pins_all_sz, but does not validate pin_func (bits 15:8)
> before indexing sppctl_list_funcs[pin_func] for fully-pinmuxed pins.
> Check that pin_func is less than sppctl_list_funcs_sz when pin_type
> selects a mux function.
>
> Fixes: aa74c44be19c ("pinctrl: Add driver for Sunplus SP7021")
> Closes: https://sashiko.dev/#/bug/linux-977252d6-b0cc-4d3a-ae2d-59d1e2f8a649
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Lee Jones <lee@xxxxxxxxxx>
> ---
Reviewed-by: Andrew Gaylard <ag@xxxxxxxxxxxx>
Tested-by: Andrew Gaylard <ag@xxxxxxxxxxxx> # on a Figment Design HW84 board