# CVE-2025-21661: gpio: virtuser: fix missing lookup table cleanups

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.19%, higher than 8% of CVEs (2026-12-01)
- Published: 2025-01-21T12:18:16.902Z
- Modified: 2026-08-05T11:53:26.900Z
- Weaknesses: CWE-401
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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 platform_device_register_full()
failure.

Besides, a consistent memory leak in lookup_table->dev_id was spotted
using kmemleak by toggling the live state between 0 and 1 with a correct
lookup table.

Introduce gpio_virtuser_remove_lookup_table() as the counterpart to the
existing gpio_virtuser_make_lookup_table() and call it from all
necessary points to ensure proper cleanup.

(As written by CVE List.)

## Affected

- Linux Linux: from 91581c4b3f29e2e22aeb1a62e842d529ca638b2d before d72d0126b1f6981f6ce8b4247305f359958c11b5; from 91581c4b3f29e2e22aeb1a62e842d529ca638b2d before a619cba8c69c434258ff4101d463322cd63e1bdc; 6.11 (not affected: before 6.11; from 6.12.10 up to 6.12.*; from 6.13 up to *)
- linux linux_kernel: from 6.11 before 6.12.10; 6.13

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- CISA-ADP: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/d72d0126b1f6981f6ce8b4247305f359958c11b5> (patch)
- <https://git.kernel.org/stable/c/a619cba8c69c434258ff4101d463322cd63e1bdc> (patch)

## Sources

- CVE List: [CVE-2025-21661](https://www.cve.org/CVERecord?id=CVE-2025-21661), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2025-21661](https://nvd.nist.gov/vuln/detail/CVE-2025-21661), Public domain, modified 2026-07-30

---

Page: https://cve.day/CVE-2025-21661 · Whole record: https://cve.day/CVE-2025-21661.json · Rebuilt by cve.day 2026-11-25T22:58:53.453Z
