Skip to content
Heist/ feed
Back to feed
UnratedFix available

gpib: Fix memory leak in ni_usb_init()

Type: advisorySources: OSV

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

Products
Kernel
Affected versions
Not specified
Fixed versions
6.18.14, 6.19.4
CVEs
CVE-2026-45939
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 10:37 UTC · Revision 1

Source evidence

gpib: Fix memory leak in ni_usb_init()

core-osv · Original source

Published 27 May 2026, 12:17 UTC

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

osv:CVE-2026-45939

Kernel

Fixed versions: 6.18.14, 6.19.4

Complete source record
{
  "id": "e4f7e707a7551a64334b248875700dbcd82cfb2ab426268c8c9f767f08276299",
  "url": "https://osv.dev/vulnerability/CVE-2026-45939",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "gpib: Fix memory leak in ni_usb_init()",
    "summary": "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().",
    "evidence": "osv:CVE-2026-45939",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.18.14",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.19.4",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2026-45939",
      "aliases": [
        "CVE-2026-45939"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "4e127de14fa78bcd98c6459b0b984b8266cd0203"
                },
                {
                  "fixed": "9c97fcfb7a62dea893104a046d544da8ac23370b"
                },
                {
                  "fixed": "c899d4b62c0757a280831e89c1f3801b597e8f38"
                },
                {
                  "fixed": "b89921eed8cf2d97250bac4be38dbcfbf048b586"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-45939.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.18.14"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.19.0"
                },
                {
                  "fixed": "6.19.4"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-45939.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:28.021343228Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/9c97fcfb7a62dea893104a046d544da8ac23370b",
        "https://git.kernel.org/stable/c/b89921eed8cf2d97250bac4be38dbcfbf048b586",
        "https://git.kernel.org/stable/c/c899d4b62c0757a280831e89c1f3801b597e8f38",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/45xxx/CVE-2026-45939.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-45939",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/45xxx/CVE-2026-45939.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-45939",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 494614,
  "published_at": "2026-05-27T12:17:55.481+00:00"
}