CVE-2025-21661: gpio: virtuser: fix missing lookup table cleanups
In the Linux kernel, the following vulnerability has been resolved:
gpio: virtuser: fix missing lookup table cleanups
When a virtuser device is created via configfs and the probe fails due to an incorrect lookup table, the table is not removed. This prevents subsequent probe attempts from succeeding, even if the issue is corrected, unless the device is released. Additionally, cleanup is also needed in the less likely case of platformdeviceregisterfull() failure.
Besides, a consistent memory leak in lookuptable->devid was spotted using kmemleak by toggling the live state between 0 and 1 with a correct lookup table.
Introduce gpiovirtuserremovelookuptable() as the counterpart to the existing gpiovirtusermakelookuptable() and call it from all necessary points to ensure proper cleanup.
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.22-1Fixed in 6.12.25-1
Event History
Frequently Asked Questions
What is the severity of CVE-2025-21661?
CVE-2025-21661 is classified as a medium severity vulnerability in the Linux kernel.
How do I fix CVE-2025-21661?
The fix for CVE-2025-21661 involves applying the latest patch provided by the Linux kernel maintainers.
Which versions of Linux are affected by CVE-2025-21661?
CVE-2025-21661 affects specific versions of the Linux kernel that implement the virtuser device through configfs.
What is the impact of CVE-2025-21661?
The impact of CVE-2025-21661 is that a failed probe due to an incorrect lookup table prevents subsequent probes from being executed.
When was CVE-2025-21661 discovered?
CVE-2025-21661 was discovered and resolved in the Linux kernel as part of the ongoing security updates.