Re: [PATCH 1/2] gpio: shared: fix use-after-free bug when adding shared proxies
From: Linus Walleij
Date: Thu Oct 01 2026 - 16:29:45 EST
On Tue, Sep 29, 2026 at 2:32 PM 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.
>
> Assisted-by: LLM
> Cc: stable@xxxxxxxxxxxxxxx
> Fixes: a060b8c511ab ("gpiolib: implement low-level, shared GPIO support")
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>
That's a good find.
Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>
Yours,
Linus Walleij