Re: [PATCH] pinctrl: qcom: fix a use-after-free bug in system shutdown path
From: Bartosz Golaszewski
Date: Mon Nov 09 2026 - 04:55:44 EST
On Thu, 05 Nov 2026 17:09:40 +0100, Bartosz Golaszewski wrote:
> msm_pinctrl_probe() allocates the pctrl structure via devm_kzalloc() and
> unconditionally populates the global variables poweroff_pctrl and
> pm_power_off.
>
> If msm_pinctrl_probe() subsequently fails, devres resources - including
> the memory allocated for pctrl - are automatically freed. However, the
> global pointers are never cleared, resulting in a use-after-free during
> kernel_power_off().
>
> [...]
Applied, thanks!
[1/1] pinctrl: qcom: fix a use-after-free bug in system shutdown path
https://git.kernel.org/brgl/c/6c940958950e5df52831fb8c78a045d426b09f1b
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>