CVE Database›Document archive›CVE-2025-21661

CVE-2025-21661

kernel: gpio: virtuser: fix missing lookup table cleanups

Loading…

Severity

Low

Red Hat Product Security

2.3

CVSS 3.1

Review impact separately from score.

Published · January 21, 2025

Updated · October 17, 2026

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.

Statement

A flaw was found in the Linux kernel's GPIO virtuser test driver. When a virtuser device is created via configfs and its probe fails due to an incorrect lookup table, the table is not removed, which prevents any subsequent probe attempt for that device from succeeding until the device is released; the same cleanup is also missing in the less likely case of a platform_device_register_full() failure. In addition, repeatedly toggling the live state of a device between 0 and 1 with a correct lookup table consistently leaks the memory allocated for lookup_table->dev_id, as detected with kmemleak. Red Hat assesses the impact of this flaw as Low, because triggering it requires local access with high privileges to the configfs-based GPIO virtuser test interface, and the consequence is limited to availability of the virtual test device rather than the system as a whole. This differs from the higher NIST (5.5) and CVE.org (7.8) severity ratings assigned by other issuers. All currently tracked Red Hat product streams, including the Red Hat Enterprise Linux kernel and kernel-rt streams and the hosted OpenShift (ARO and OSD) streams, are marked not affected by this flaw.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

No mitigation is specified in collected source.

CVSS / CWE

CVSS 3.1 · 2.3
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:L

CWE-401 · Missing Release of Memory after Effective Lifetime