CVE-2025-21958 (GCVE-0-2025-21958)

Vulnerability from cvelistv5 – Published: 2025-04-01 15:46 – Updated: 2026-08-05 11:55
VLAI
Title
Revert "openvswitch: switch to per-action label counting in conntrack"
Summary
In the Linux kernel, the following vulnerability has been resolved: Revert "openvswitch: switch to per-action label counting in conntrack" Currently, ovs_ct_set_labels() is only called for confirmed conntrack entries (ct) within ovs_ct_commit(). However, if the conntrack entry does not have the labels_ext extension, attempting to allocate it in ovs_ct_get_conn_labels() for a confirmed entry triggers a warning in nf_ct_ext_add(): WARN_ON(nf_ct_is_confirmed(ct)); This happens when the conntrack entry is created externally before OVS increments net->ct.labels_used. The issue has become more likely since commit fcb1aa5163b1 ("openvswitch: switch to per-action label counting in conntrack"), which changed to use per-action label counting and increment net->ct.labels_used when a flow with ct action is added. Since there’s no straightforward way to fully resolve this issue at the moment, this reverts the commit to avoid breaking existing use cases.
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: fcb1aa5163b1ae4cf2864b688b08927aac51f51e , < 9e79fdabd52cfce1a021640a81256878a2c516a2 (git)
Affected: fcb1aa5163b1ae4cf2864b688b08927aac51f51e , < d91bfc64a4886102746e74d2c6f3a61e9a77fd7d (git)
Affected: fcb1aa5163b1ae4cf2864b688b08927aac51f51e , < 1063ae07383c0ddc5bcce170260c143825846b03 (git)
Create a notification for this product.
Linux Linux Affected: 6.12
Unaffected: 0 , < 6.12 (semver)
Unaffected: 6.12.20 , ≤ 6.12.* (semver)
Unaffected: 6.13.8 , ≤ 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": [
            "net/openvswitch/conntrack.c",
            "net/openvswitch/datapath.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "9e79fdabd52cfce1a021640a81256878a2c516a2",
              "status": "affected",
              "version": "fcb1aa5163b1ae4cf2864b688b08927aac51f51e",
              "versionType": "git"
            },
            {
              "lessThan": "d91bfc64a4886102746e74d2c6f3a61e9a77fd7d",
              "status": "affected",
              "version": "fcb1aa5163b1ae4cf2864b688b08927aac51f51e",
              "versionType": "git"
            },
            {
              "lessThan": "1063ae07383c0ddc5bcce170260c143825846b03",
              "status": "affected",
              "version": "fcb1aa5163b1ae4cf2864b688b08927aac51f51e",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "net/openvswitch/conntrack.c",
            "net/openvswitch/datapath.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.12"
            },
            {
              "lessThan": "6.12",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.20",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.13.*",
              "status": "unaffected",
              "version": "6.13.8",
              "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.12.20",
                  "versionStartIncluding": "6.12",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.13.8",
                  "versionStartIncluding": "6.12",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.14",
                  "versionStartIncluding": "6.12",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nRevert \"openvswitch: switch to per-action label counting in conntrack\"\n\nCurrently, ovs_ct_set_labels() is only called for confirmed conntrack\nentries (ct) within ovs_ct_commit(). However, if the conntrack entry\ndoes not have the labels_ext extension, attempting to allocate it in\novs_ct_get_conn_labels() for a confirmed entry triggers a warning in\nnf_ct_ext_add():\n\n  WARN_ON(nf_ct_is_confirmed(ct));\n\nThis happens when the conntrack entry is created externally before OVS\nincrements net-\u003ect.labels_used. The issue has become more likely since\ncommit fcb1aa5163b1 (\"openvswitch: switch to per-action label counting\nin conntrack\"), which changed to use per-action label counting and\nincrement net-\u003ect.labels_used when a flow with ct action is added.\n\nSince there\u2019s no straightforward way to fully resolve this issue at the\nmoment, this reverts the commit to avoid breaking existing use cases."
        }
      ],
      "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 - Triggering requires installing an OVS datapath flow carrying a ct action with a non-zero label mask via the openvswitch generic-netlink interface, which is a local operation. Although the packet that fires the bug can arrive from the wire on an OVS/OVN host, the necessary local netlink configuration step makes Local the defensible vector.\nAC:L - The attacker fully controls the ordering that creates the bug \u2014 create the conntrack entry while net-\u003ect.labels_used is zero, then install the ct-label flow, then re-send a packet of that connection \u2014 and equally controls the concurrent traffic that turns the krealloc of a hash-visible ct-\u003eext into a use-after-free. No condition lies outside attacker influence.\nPR:L - All OVS datapath/flow/vport netlink commands use GENL_UNS_ADMIN_PERM, i.e. CAP_NET_ADMIN in the netns owner user namespace, which any unprivileged user obtains with unshare -Urn; nftables in the same namespace supplies the externally created conntrack entry.\nUI:N - The attacker performs every step \u2014 namespace setup, flow installation and packet injection \u2014 with no action from any other user.\nS:U - The corruption is confined to kernel heap objects belonging to the same kernel security authority; no VM, IOMMU or sandbox boundary is crossed.\nC:H - nf_ct_ext_add() reallocates ct-\u003eext on a confirmed, hash-table-visible conntrack with no RCU grace period, so lock-free readers such as nf_conn_acct_find(), nfct_nat(), nf_ct_ecache_find() and nf_ct_labels_find() dereference freed memory, giving a use-after-free read that can be groomed to disclose arbitrary kernel heap contents.\nI:H - The same window is a use-after-free write \u2014 nf_ct_acct_update() performs atomic64_add() into the freed extension block, and nf_ct_ext_add() itself writes offsets and memsets into a buffer another CPU may already have reallocated \u2014 yielding heap corruption exploitable for control-flow hijack.\nA:H - The WARN_ON(nf_ct_is_confirmed(ct)) splat is an immediate kernel warning that panics the machine under panic_on_warn, and the underlying use-after-free readily causes oopses and slab corruption crashes."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T11:55:36.868Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/9e79fdabd52cfce1a021640a81256878a2c516a2"
        },
        {
          "url": "https://git.kernel.org/stable/c/d91bfc64a4886102746e74d2c6f3a61e9a77fd7d"
        },
        {
          "url": "https://git.kernel.org/stable/c/1063ae07383c0ddc5bcce170260c143825846b03"
        }
      ],
      "title": "Revert \"openvswitch: switch to per-action label counting in conntrack\"",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-21958",
    "datePublished": "2025-04-01T15:46:57.268Z",
    "dateReserved": "2024-12-29T08:45:45.791Z",
    "dateUpdated": "2026-08-05T11:55:36.868Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2025-21958",
      "date": "2026-08-09",
      "epss": "0.00145",
      "percentile": "0.0428"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2025-21958\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-04-01T16:15:27.010\",\"lastModified\":\"2026-07-30T06:21:59.313\",\"vulnStatus\":\"Modified\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nRevert \\\"openvswitch: switch to per-action label counting in conntrack\\\"\\n\\nCurrently, ovs_ct_set_labels() is only called for confirmed conntrack\\nentries (ct) within ovs_ct_commit(). However, if the conntrack entry\\ndoes not have the labels_ext extension, attempting to allocate it in\\novs_ct_get_conn_labels() for a confirmed entry triggers a warning in\\nnf_ct_ext_add():\\n\\n  WARN_ON(nf_ct_is_confirmed(ct));\\n\\nThis happens when the conntrack entry is created externally before OVS\\nincrements net-\u003ect.labels_used. The issue has become more likely since\\ncommit fcb1aa5163b1 (\\\"openvswitch: switch to per-action label counting\\nin conntrack\\\"), which changed to use per-action label counting and\\nincrement net-\u003ect.labels_used when a flow with ct action is added.\\n\\nSince there\u2019s no straightforward way to fully resolve this issue at the\\nmoment, this reverts the commit to avoid breaking existing use cases.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: Revertir \\\"openvswitch: cambiar al conteo de etiquetas por acci\u00f3n en conntrack\\\". Actualmente, ovs_ct_set_labels() solo se llama para entradas de conntrack confirmadas (ct) dentro de ovs_ct_commit(). Sin embargo, si la entrada de conntrack no tiene la extensi\u00f3n labels_ext, al intentar asignarla en ovs_ct_get_conn_labels() para una entrada confirmada, se genera una advertencia en nf_ct_ext_add(): WARN_ON(nf_ct_is_confirmed(ct)); Esto ocurre cuando la entrada de conntrack se crea externamente antes de que OVS incremente net-\u0026gt;ct.labels_used. El problema se ha vuelto m\u00e1s frecuente desde el commit fcb1aa5163b1 (\\\"openvswitch: cambio al conteo de etiquetas por acci\u00f3n en conntrack\\\"), que cambi\u00f3 para usar el conteo de etiquetas por acci\u00f3n e incrementar net-\u0026gt;ct.labels_used al agregar un flujo con la acci\u00f3n ct. Dado que actualmente no existe una soluci\u00f3n directa para este problema, esta reversi\u00f3n de el commit evita la interrupci\u00f3n de los casos de uso existentes.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"net/openvswitch/conntrack.c\",\"net/openvswitch/datapath.h\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"fcb1aa5163b1ae4cf2864b688b08927aac51f51e\",\"lessThan\":\"9e79fdabd52cfce1a021640a81256878a2c516a2\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"fcb1aa5163b1ae4cf2864b688b08927aac51f51e\",\"lessThan\":\"d91bfc64a4886102746e74d2c6f3a61e9a77fd7d\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"fcb1aa5163b1ae4cf2864b688b08927aac51f51e\",\"lessThan\":\"1063ae07383c0ddc5bcce170260c143825846b03\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"net/openvswitch/conntrack.c\",\"net/openvswitch/datapath.h\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"6.12\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"6.12\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.12.20\",\"lessThanOrEqual\":\"6.12.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.13.8\",\"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:H/PR:L/UI:N/S:U/C:N/I:N/A:H\",\"baseScore\":4.7,\"baseSeverity\":\"MEDIUM\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"HIGH\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.0,\"impactScore\":3.6}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-367\"},{\"lang\":\"en\",\"value\":\"NVD-CWE-noinfo\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.12\",\"versionEndExcluding\":\"6.12.20\",\"matchCriteriaId\":\"F6AE02FC-5B2D-426A-B8D7-3D71FBE28D40\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.13\",\"versionEndExcluding\":\"6.13.8\",\"matchCriteriaId\":\"0A20D4D7-B329-4C68-B662-76062EA7DCF0\"},{\"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\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.14:rc5:*:*:*:*:*:*\",\"matchCriteriaId\":\"45B90F6B-BEC7-4D4E-883A-9DBADE021750\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.14:rc6:*:*:*:*:*:*\",\"matchCriteriaId\":\"1759FFB7-531C-41B1-9AE1-FD3D80E0D920\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/1063ae07383c0ddc5bcce170260c143825846b03\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/9e79fdabd52cfce1a021640a81256878a2c516a2\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/d91bfc64a4886102746e74d2c6f3a61e9a77fd7d\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]}]}}",
    "redhat_vex": {
      "aggregate_severity": "Low",
      "current_release_date": "2026-07-30T10:12:29+00:00",
      "cve": "CVE-2025-21958",
      "id": "CVE-2025-21958",
      "initial_release_date": "2025-04-01T00:00:00+00:00",
      "product_status:known_affected": "76",
      "product_status:known_not_affected": "198",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: Revert \"openvswitch: switch to per-action label counting in conntrack\"",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-21958.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-07-31T01:18:40Z",
      "cve": "CVE-2025-21958",
      "id": "CVE-2025-21958",
      "initial_release_date": "2025-04-04T02:58:36Z",
      "product_status:known_not_affected": "348",
      "product_status:recommended": "53",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2025-21958",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2025-21958.json",
      "version": "14"
    }
  }
}



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…