Re: [PATCH] platform/x86: acer-wmi: fix UAF after accelerometer registration failure
From: Krzysztof Kozlowski
Date: Tue Oct 27 2026 - 11:38:44 EST
On 26/10/2026 12:11, Guangshuo Li wrote:
> When input_register_device() fails in acer_wmi_accel_setup(), the error
> path frees acer_wmi_accel_dev but leaves the global pointer non-NULL.
>
> Since acer_wmi_init() ignores the accelerometer setup failure and
> continues initialization, a later driver removal or initialization
> failure can call input_unregister_device() on the dangling pointer,
> resulting in a use-after-free.
>
> Set acer_wmi_accel_dev to NULL after freeing it so that the cleanup
> paths do not attempt to unregister the already-freed input device.
>
> This issue was found by our static analysis tool under development.
>
> Fixes: 1eb3fe1d3b6b ("ACER: Add support for accelerometer sensor")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Guangshuo Li <lgs201920130244@xxxxxxxxx>
> ---
So you just keep ignoring and ignoring our feedback. It's just bot, so
little point to discuss with bot.
Best regards,
Krzysztof