Re: [PATCH v4 1/4] gpio: shared: fix use-after-free bug when adding shared proxies

From: Linus Walleij

Date: Fri Oct 16 2026 - 09:10:16 EST


On Wed, Oct 14, 2026 at 11:38 AM Bartosz Golaszewski
<bartosz.golaszewski@xxxxxxxxxxxxxxxx> wrote:

> The GPIO lookup table can stay alive for longer than the kobject whose
> name string's address we're assigning to lookup->dev_id. Fix a potential
> UAF by duplicating the string.
>
> Cc: stable@xxxxxxxxxxxxxxx
> Fixes: a060b8c511ab ("gpiolib: implement low-level, shared GPIO support")
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>

LGTM
Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>

Yours,
Linus Walleij