Description
In the Linux kernel, the following vulnerability has been resolved:

gpib: Fix memory leak in ni_usb_init()

In ni_usb_init(), if ni_usb_setup_init() fails, the function returns
-EFAULT without freeing the allocated writes buffer, leading to a
memory leak.

Additionally, ni_usb_setup_init() returns 0 on failure, which causes
ni_usb_init() to return -EFAULT, an inappropriate error code for this
situation.

Fix the leak by freeing writes in the error path. Modify
ni_usb_setup_init() to return -EINVAL on failure and propagate this
error code in ni_usb_init().
Published: 2026-05-27
Score: n/a
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

In the Linux kernel GPIB USB driver, the function ni_usb_init() allocates a writes buffer that is not freed when the helper ni_usb_setup_init() fails. This memory leak in kernel space can gradually deplete available memory, potentially degrading performance or causing a kernel crash. Additionally, the function returns an incorrect error code (-EFAULT) when the helper fails, which may mislead callers about the failure reason and represents a CWE‑772 vulnerability.

Affected Systems

All Linux kernel releases that include the unpatched GPIB USB driver. Any system running such a kernel version while the GPIB USB module is loaded is vulnerable.

Risk and Exploitability

The flaw does not provide remote code execution or privilege escalation. Exploitation requires local access to trigger the initialization path, such as by repeatedly opening the GPIB device from user space. Based on the description, it is inferred that an attacker with local privilege can repeatedly exercise the vulnerable path to exhaust kernel memory. The EPSS score of <1% indicates a very low probability of widespread exploitation. This issue is not listed in the CISA KEV catalog, and the overall risk is limited to memory exhaustion rather than direct data compromise.

Generated by OpenCVE AI on May 28, 2026 at 17:27 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that includes the patch freeing the writes buffer on initialization failure.
  • Reload the GPIB USB kernel module or reboot the system to clear any leaks created before the patch was applied.
  • If the GPIB USB driver is not required, disable or remove the module so that the vulnerable code never executes.

Generated by OpenCVE AI on May 28, 2026 at 17:27 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 28 May 2026 15:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-401

Thu, 28 May 2026 12:15:00 +0000


Wed, 27 May 2026 16:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-401

Wed, 27 May 2026 14:15:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: gpib: Fix memory leak in ni_usb_init() In ni_usb_init(), if ni_usb_setup_init() fails, the function returns -EFAULT without freeing the allocated writes buffer, leading to a memory leak. Additionally, ni_usb_setup_init() returns 0 on failure, which causes ni_usb_init() to return -EFAULT, an inappropriate error code for this situation. Fix the leak by freeing writes in the error path. Modify ni_usb_setup_init() to return -EINVAL on failure and propagate this error code in ni_usb_init().
Title gpib: Fix memory leak in ni_usb_init()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-05-27T12:17:55.481Z

Reserved: 2026-05-13T15:03:33.087Z

Link: CVE-2026-45939

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-05-27T14:17:10.083

Modified: 2026-05-27T14:48:03.013

Link: CVE-2026-45939

cve-icon Redhat

Severity :

Publid Date: 2026-05-27T00:00:00Z

Links: CVE-2026-45939 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-05-28T17:30:15Z

Weaknesses
  • CWE-772

    Missing Release of Resource after Effective Lifetime