CVE-2026-23158: gpio: virtuser: fix UAF in configfs release path
In the Linux kernel, the following vulnerability has been resolved:
gpio: virtuser: fix UAF in configfs release path
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 mutexunlock() to operate on freed memory.
Specifically, gpiovirtuserdeviceconfiggrouprelease() destroys the mutex and frees the device while still inside the guard(mutex) scope. When the function returns, the guard cleanup invokes mutexunlock(&dev->lock), resulting in a slab use-after-free.
Limit the mutex lifetime by using a scopedguard() only around the activation check, so that the lock is released before mutexdestroy() and kfree() are called.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2026-23158?
The severity of CVE-2026-23158 is considered moderate due to a use-after-free (UAF) issue in the Linux kernel's gpio-virtuser implementation.
How do I fix CVE-2026-23158?
To fix CVE-2026-23158, you should update your Linux kernel to the latest version where the vulnerability has been patched.
What systems are affected by CVE-2026-23158?
CVE-2026-23158 affects Linux kernel versions that include the gpio-virtuser implementation.
What could happen if CVE-2026-23158 is exploited?
Exploitation of CVE-2026-23158 could lead to system crashes or arbitrary code execution due to the use-after-free vulnerability.
When was CVE-2026-23158 disclosed?
CVE-2026-23158 was disclosed in the first half of 2026 after the vulnerability was resolved in the Linux kernel.