Re: [PATCH v2] pinctrl: zynqmp: Ensure function names are NUL terminated
From: Linus Walleij
Date: Mon Nov 30 2026 - 15:49:01 EST
On Wed, Nov 18, 2026 at 12:18 PM Sai Krishna Potthuri
<sai.krishna.potthuri@xxxxxxx> wrote:
> PM_QID_PINCTRL_GET_FUNCTION_NAME returns the function name in a fixed
> 16-byte field and does not guarantee NUL termination. A 16-character
> name fills the entire field.
> The driver copies this field into a 16-byte buffer and subsequently
> uses it as a C string. For a non-NUL-terminated name, string operations
> can read past the end of the buffer into the adjacent groups pointer.
>
> Reserve an extra byte for the NUL terminator and explicitly terminate
> the copied function name.
>
> Signed-off-by: Sai Krishna Potthuri <sai.krishna.potthuri@xxxxxxx>
Patch applied!
Yours,
Linus Walleij