Skip to content
Heist/ feed
Back to feed
UnratedFix available

net: ngbe: fix memory leak in ngbe_probe() error path

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: net: ngbe: fix memory leak in ngbe_probe() error path When ngbe_sw_init() is called, memory is allocated for wx->rss_key in wx_init_rss_key(). However, in ngbe_probe() function, the subsequent error paths after ngbe_sw_init() don't free the rss_key. Fix that by freeing it in error path along with wx->mac_table. Also change the label to which execution jumps when ngbe_sw_init() fails, because otherwise, it could lead to a double free for rss_key, when the mac_table allocation fails in wx_sw_init().

Products
Kernel
Affected versions
Not specified
Fixed versions
6.12.25, 6.14.4, 6.6.88
CVEs
CVE-2025-37874
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 14:46 UTC · Revision 1

Source evidence

net: ngbe: fix memory leak in ngbe_probe() error path

core-osv · Original source

Published 9 May 2025, 06:44 UTC

In the Linux kernel, the following vulnerability has been resolved: net: ngbe: fix memory leak in ngbe_probe() error path When ngbe_sw_init() is called, memory is allocated for wx->rss_key in wx_init_rss_key(). However, in ngbe_probe() function, the subsequent error paths after ngbe_sw_init() don't free the rss_key. Fix that by freeing it in error path along with wx->mac_table. Also change the label to which execution jumps when ngbe_sw_init() fails, because otherwise, it could lead to a double free for rss_key, when the mac_table allocation fails in wx_sw_init().

osv:CVE-2025-37874

Kernel

Fixed versions: 6.6.88, 6.12.25, 6.14.4

Complete source record
{
  "id": "8474982cefab0ba5c2632422b4036e0f3f14f32017981262dd31df596be56221",
  "url": "https://osv.dev/vulnerability/CVE-2025-37874",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "net: ngbe: fix memory leak in ngbe_probe() error path",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: net: ngbe: fix memory leak in ngbe_probe() error path When ngbe_sw_init() is called, memory is allocated for wx->rss_key in wx_init_rss_key(). However, in ngbe_probe() function, the subsequent error paths after ngbe_sw_init() don't free the rss_key. Fix that by freeing it in error path along with wx->mac_table. Also change the label to which execution jumps when ngbe_sw_init() fails, because otherwise, it could lead to a double free for rss_key, when the mac_table allocation fails in wx_sw_init().",
    "evidence": "osv:CVE-2025-37874",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.6.88",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.25",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.14.4",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2025-37874",
      "aliases": [
        "CVE-2025-37874"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "02338c484ab6250b81f0266ffb40d53c3efe0f47"
                },
                {
                  "fixed": "7c2b66a31c7a4866400f7e6fb43cb32021bfca01"
                },
                {
                  "fixed": "8335a3feb9d0d97e5e8f76d38b6bb8573d5b4a29"
                },
                {
                  "fixed": "397487338eff1891c4654ce7deaafbf72a1688b2"
                },
                {
                  "fixed": "88fa80021b77732bc98f73fb69d69c7cc37b9f0d"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-37874.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.88"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.25"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.14.4"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-37874.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:29.902603258Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/397487338eff1891c4654ce7deaafbf72a1688b2",
        "https://git.kernel.org/stable/c/7c2b66a31c7a4866400f7e6fb43cb32021bfca01",
        "https://git.kernel.org/stable/c/8335a3feb9d0d97e5e8f76d38b6bb8573d5b4a29",
        "https://git.kernel.org/stable/c/88fa80021b77732bc98f73fb69d69c7cc37b9f0d",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/37xxx/CVE-2025-37874.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-37874",
        "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/2025/37xxx/CVE-2025-37874.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-37874",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 496496,
  "published_at": "2025-05-09T06:44:02.314+00:00"
}