Re: [PATCH v2] gpio: virtuser: fix UAF in configfs release path
From: Bartosz Golaszewski
Date: Tue Jan 27 2026 - 04:17:31 EST
On Mon, 26 Jan 2026 12:03:48 +0800, Yuhao Huang wrote:
> The gpio-virtuser configfs release path uses guard(mutex) to protect
> the device structure. However, the device is freed before the guard
> cleanup runs, causing mutex_unlock() to operate on freed memory.
>
> Specifically, gpio_virtuser_device_config_group_release() destroys
> the mutex and frees the device while still inside the guard(mutex)
> scope. When the function returns, the guard cleanup invokes
> mutex_unlock(&dev->lock), resulting in a slab use-after-free.
>
> [...]
Applied, thanks!
[1/1] gpio: virtuser: fix UAF in configfs release path
commit: 320ae0de18e16ad6ba45f4bbc493a3d141d3b94c
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>