CVE-2025-21882 (GCVE-0-2025-21882)

Vulnerability from cvelistv5 – Published: 2025-03-27 14:57 – Updated: 2026-08-05 11:55
VLAI
Title
net/mlx5: Fix vport QoS cleanup on error
Summary
In the Linux kernel, the following vulnerability has been resolved: net/mlx5: Fix vport QoS cleanup on error When enabling vport QoS fails, the scheduling node was never freed, causing a leak. Add the missing free and reset the vport scheduling node pointer to NULL.
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: be034baba83e2a80a0b2c0f24c08547b6eedc79a , < fead368502bce0e10bea7c0d2895b2fa0c6c10aa (git)
Affected: be034baba83e2a80a0b2c0f24c08547b6eedc79a , < 7f3528f7d2f98b70e19a6bb7b130fc82c079ac54 (git)
Create a notification for this product.
Linux Linux Affected: 6.13
Unaffected: 0 , < 6.13 (semver)
Unaffected: 6.13.6 , ≤ 6.13.* (semver)
Unaffected: 6.14 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "fead368502bce0e10bea7c0d2895b2fa0c6c10aa",
              "status": "affected",
              "version": "be034baba83e2a80a0b2c0f24c08547b6eedc79a",
              "versionType": "git"
            },
            {
              "lessThan": "7f3528f7d2f98b70e19a6bb7b130fc82c079ac54",
              "status": "affected",
              "version": "be034baba83e2a80a0b2c0f24c08547b6eedc79a",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.13"
            },
            {
              "lessThan": "6.13",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.13.*",
              "status": "unaffected",
              "version": "6.13.6",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.14",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.13.6",
                  "versionStartIncluding": "6.13",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.14",
                  "versionStartIncluding": "6.13",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5: Fix vport QoS cleanup on error\n\nWhen enabling vport QoS fails, the scheduling node was never freed,\ncausing a leak.\n\nAdd the missing free and reset the vport scheduling node pointer to\nNULL."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The vulnerable code is reached only through local configuration interfaces \u2014 devlink rate netlink, rtnetlink `ip link set ... vf N rate`, or tc matchall/police offload on a VF representor. No remote peer data reaches this path.\nAC:L - The attacker drives the failing branch himself by exhausting the E-Switch scheduling-element pool through repeated rate-object creation across VFs/SFs (and on FW not advertising the VPORT element type in the E-Switch hierarchy it fails deterministically on the first try), then triggers the dangling-pointer use with a follow-up rate operation or VF teardown. No condition lies outside the attacker\u0027s influence.\nPR:L - The tc and `ndo_set_vf_rate` paths gate only on `netlink_net_capable(skb, CAP_NET_ADMIN)`, i.e. CAP_NET_ADMIN in the network namespace\u0027s owning user namespace, so an unprivileged user inside a userns-owned container netns holding a delegated mlx5 representor/netdev can reach `mlx5_esw_qos_vport_enable()`. This is delegated, non-root-equivalent privilege.\nUI:N - The whole sequence \u2014 failed rate set, then subsequent rate operation or VF teardown \u2014 is performed by the attacker alone. No victim action is needed.\nS:U - The corruption is confined to mlx5 eswitch QoS objects in kernel heap memory within the same security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The stale `sched_node-\u003eparent` makes `esw_qos_normalize_min_rate()` walk `parent-\u003echildren` out of a freed, attacker-groomable slab object and dereference `node-\u003eesw-\u003edev`, yielding a controlled-read primitive over kernel memory rather than a bounded leak.\nI:H - The freed parent is written through `list_del_init(\u0026vport_node-\u003eentry)` and via `node-\u003emax_rate`/`node-\u003ebw_share` stores reached through pointers read from freed memory, giving a UAF write primitive; the `esw_qos_put()` refcount imbalance additionally frees a live node0 out from under other vports, and the stale `ix == 0` causes FW MODIFY/DESTROY on unrelated scheduling elements.\nA:H - VF teardown unconditionally walks the dangling node, producing list-debug corruption, `refcount_t` underflow WARNs and oops/panic from the use-after-free; destroying scheduling element 0 can additionally tear down the E-Switch root TSAR and disrupt traffic for every port on the adapter."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T11:55:05.817Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/fead368502bce0e10bea7c0d2895b2fa0c6c10aa"
        },
        {
          "url": "https://git.kernel.org/stable/c/7f3528f7d2f98b70e19a6bb7b130fc82c079ac54"
        }
      ],
      "title": "net/mlx5: Fix vport QoS cleanup on error",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-21882",
    "datePublished": "2025-03-27T14:57:10.906Z",
    "dateReserved": "2024-12-29T08:45:45.782Z",
    "dateUpdated": "2026-08-05T11:55:05.817Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2025-21882",
      "date": "2026-08-12",
      "epss": "0.00174",
      "percentile": "0.07046"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2025-21882\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-03-27T15:15:56.117\",\"lastModified\":\"2026-07-30T06:21:54.870\",\"vulnStatus\":\"Modified\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nnet/mlx5: Fix vport QoS cleanup on error\\n\\nWhen enabling vport QoS fails, the scheduling node was never freed,\\ncausing a leak.\\n\\nAdd the missing free and reset the vport scheduling node pointer to\\nNULL.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: net/mlx5: Se corrige la limpieza de QoS de vport en caso de error. Al fallar la habilitaci\u00f3n de QoS de vport, el nodo de programaci\u00f3n nunca se liberaba, lo que causaba una fuga. Agregue la liberaci\u00f3n faltante y restablezca el puntero del nodo de programaci\u00f3n de vport a NULL.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"be034baba83e2a80a0b2c0f24c08547b6eedc79a\",\"lessThan\":\"fead368502bce0e10bea7c0d2895b2fa0c6c10aa\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"be034baba83e2a80a0b2c0f24c08547b6eedc79a\",\"lessThan\":\"7f3528f7d2f98b70e19a6bb7b130fc82c079ac54\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"6.13\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"6.13\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.13.6\",\"lessThanOrEqual\":\"6.13.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.14\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\",\"baseScore\":7.8,\"baseSeverity\":\"HIGH\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":5.9},{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H\",\"baseScore\":5.5,\"baseSeverity\":\"MEDIUM\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":3.6}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-401\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.13\",\"versionEndExcluding\":\"6.13.6\",\"matchCriteriaId\":\"64F12D9B-71C2-4CD7-A288-0D5EF1709620\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.14:rc1:*:*:*:*:*:*\",\"matchCriteriaId\":\"186716B6-2B66-4BD0-852E-D48E71C0C85F\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.14:rc2:*:*:*:*:*:*\",\"matchCriteriaId\":\"0D3E781C-403A-498F-9DA9-ECEE50F41E75\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.14:rc3:*:*:*:*:*:*\",\"matchCriteriaId\":\"66619FB8-0AAF-4166-B2CF-67B24143261D\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.14:rc4:*:*:*:*:*:*\",\"matchCriteriaId\":\"D3D6550E-6679-4560-902D-AF52DCFE905B\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/7f3528f7d2f98b70e19a6bb7b130fc82c079ac54\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/fead368502bce0e10bea7c0d2895b2fa0c6c10aa\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]}]}}",
    "redhat_vex": {
      "aggregate_severity": "Low",
      "current_release_date": "2026-07-30T10:13:11+00:00",
      "cve": "CVE-2025-21882",
      "id": "CVE-2025-21882",
      "initial_release_date": "2025-03-27T00:00:00+00:00",
      "product_status:known_not_affected": "274",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: net/mlx5: Fix vport QoS cleanup on error",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-21882.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-07-19T17:51:25Z",
      "cve": "CVE-2025-21882",
      "id": "CVE-2025-21882",
      "initial_release_date": "2025-03-28T03:00:49Z",
      "product_status:known_affected": "57",
      "product_status:known_not_affected": "285",
      "product_status:recommended": "145",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2025-21882",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2025-21882.json",
      "version": "19"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…