GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration

CVE-2025-39978 (GCVE-0-2025-39978)

Vulnerability from cvelistv5 – Published: 2025-10-15 07:55 – Updated: 2026-09-08 08:42
VLAI
Title
octeontx2-pf: Fix potential use after free in otx2_tc_add_flow()
Summary
In the Linux kernel, the following vulnerability has been resolved: octeontx2-pf: Fix potential use after free in otx2_tc_add_flow() This code calls kfree_rcu(new_node, rcu) and then dereferences "new_node" and then dereferences it on the next line. Two lines later, we take a mutex so I don't think this is an RCU safe region. Re-order it to do the dereferences before queuing up the free.
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 68fbff68dbea35f9e6f7649dd22fce492a5aedac , < 5723120423a753a220b8b2954b273838b9d7e74a (git)
Affected: 68fbff68dbea35f9e6f7649dd22fce492a5aedac , < df2c071061ed52d2225d97b212d27ecedf456b8a (git)
Affected: 68fbff68dbea35f9e6f7649dd22fce492a5aedac , < c41b2941a024d4ec7c768e16ffb10a74b188fced (git)
Affected: 68fbff68dbea35f9e6f7649dd22fce492a5aedac , < a8a63f27c3a8a3714210d32b12fd0f16d0337414 (git)
Affected: 68fbff68dbea35f9e6f7649dd22fce492a5aedac , < d9c70e93ec5988ab07ad2a92d9f9d12867f02c56 (git)
guessed Create a notification for this product.
Linux Linux Affected: 5.14
Unaffected: 0 , < 5.14 (semver)
Unaffected: 6.1.155 , ≤ 6.1.* (semver)
Unaffected: 6.6.109 , ≤ 6.6.* (semver)
Unaffected: 6.12.50 , ≤ 6.12.* (semver)
Unaffected: 6.16.10 , ≤ 6.16.* (semver)
Unaffected: 6.17 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP Affected: V3.1.6 , < * (custom)
guessed Create a notification for this product.
Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP Affected: V3.1.6 , < * (custom)
guessed Create a notification for this product.
Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP Affected: V3.1.6 , < * (custom)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "affected": [
          {
            "defaultStatus": "unknown",
            "product": "SIMATIC S7-1500 CPU 1518-4 PN/DP MFP",
            "vendor": "Siemens",
            "versions": [
              {
                "lessThan": "*",
                "status": "affected",
                "version": "V3.1.6",
                "versionType": "custom"
              }
            ]
          },
          {
            "defaultStatus": "unknown",
            "product": "SIMATIC S7-1500 CPU 1518-4 PN/DP MFP",
            "vendor": "Siemens",
            "versions": [
              {
                "lessThan": "*",
                "status": "affected",
                "version": "V3.1.6",
                "versionType": "custom"
              }
            ]
          },
          {
            "defaultStatus": "unknown",
            "product": "SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP",
            "vendor": "Siemens",
            "versions": [
              {
                "lessThan": "*",
                "status": "affected",
                "version": "V3.1.6",
                "versionType": "custom"
              }
            ]
          },
          {
            "defaultStatus": "unknown",
            "product": "SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP",
            "vendor": "Siemens",
            "versions": [
              {
                "lessThan": "*",
                "status": "affected",
                "version": "V3.1.6",
                "versionType": "custom"
              }
            ]
          },
          {
            "defaultStatus": "unknown",
            "product": "SIPLUS S7-1500 CPU 1518-4 PN/DP MFP",
            "vendor": "Siemens",
            "versions": [
              {
                "lessThan": "*",
                "status": "affected",
                "version": "V3.1.6",
                "versionType": "custom"
              }
            ]
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2026-09-08T08:42:40.637Z",
          "orgId": "0b142b55-0307-4c5a-b3c9-f314f3fb7c5e",
          "shortName": "siemens-SADP"
        },
        "references": [
          {
            "url": "https://cert-portal.siemens.com/productcert/html/ssa-019113.html"
          }
        ],
        "x_adpType": "supplier"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "5723120423a753a220b8b2954b273838b9d7e74a",
              "status": "affected",
              "version": "68fbff68dbea35f9e6f7649dd22fce492a5aedac",
              "versionType": "git"
            },
            {
              "lessThan": "df2c071061ed52d2225d97b212d27ecedf456b8a",
              "status": "affected",
              "version": "68fbff68dbea35f9e6f7649dd22fce492a5aedac",
              "versionType": "git"
            },
            {
              "lessThan": "c41b2941a024d4ec7c768e16ffb10a74b188fced",
              "status": "affected",
              "version": "68fbff68dbea35f9e6f7649dd22fce492a5aedac",
              "versionType": "git"
            },
            {
              "lessThan": "a8a63f27c3a8a3714210d32b12fd0f16d0337414",
              "status": "affected",
              "version": "68fbff68dbea35f9e6f7649dd22fce492a5aedac",
              "versionType": "git"
            },
            {
              "lessThan": "d9c70e93ec5988ab07ad2a92d9f9d12867f02c56",
              "status": "affected",
              "version": "68fbff68dbea35f9e6f7649dd22fce492a5aedac",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.14"
            },
            {
              "lessThan": "5.14",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.155",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.109",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.50",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.16.*",
              "status": "unaffected",
              "version": "6.16.10",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.17",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.155",
                  "versionStartIncluding": "5.14",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.109",
                  "versionStartIncluding": "5.14",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.50",
                  "versionStartIncluding": "5.14",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.16.10",
                  "versionStartIncluding": "5.14",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.17",
                  "versionStartIncluding": "5.14",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nocteontx2-pf: Fix potential use after free in otx2_tc_add_flow()\n\nThis code calls kfree_rcu(new_node, rcu) and then dereferences \"new_node\"\nand then dereferences it on the next line.  Two lines later, we take\na mutex so I don\u0027t think this is an RCU safe region.  Re-order it to do\nthe dereferences before queuing up the free."
        }
      ],
      "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 path is reached only through a local `RTM_NEWTFILTER` netlink message installing a tc flower filter with a police action on an octeontx2 PF/VF/representor netdev. There is no remote packet-processing path into `otx2_tc_add_flow()`.\nAC:L - The attacker deterministically forces the `free_leaf:` error path by installing police-action flower rules until MCAM/mbox resources are exhausted, and widens the RCU grace-period window at will by contending `nic-\u003embox.lock` from a second thread so `mutex_lock()` sleeps. Both the free and the reclaim/spray side are under attacker control.\nPR:L - Only CAP_NET_ADMIN over the netns owning the device is needed, and `otx2_setup_tc` is shared by the VF (`otx2_vf.c:535`) and representor (`rep.c:495`) drivers, whose netdevs are commonly delegated into container netns owned by unprivileged user namespaces where container-root holds CAP_NET_ADMIN with no init-namespace privilege.\nUI:N - The entire sequence is driven by the attacker\u0027s own netlink filter-install requests. No victim action or cooperation is involved.\nS:U - The use-after-free corrupts kernel heap and driver state within the same kernel security authority. No VM, IOMMU, or sandbox boundary is crossed.\nC:H - The freed `struct otx2_tc_flow` is read back after reclaim, giving a read primitive over whatever slab object replaced it, and the stale `rq`/`leaf_profile` values are further exposed to userspace through `netdev_err()` kernel-log messages.\nI:H - `__clear_bit(new_node-\u003erq, \u0026nic-\u003erq_bmap)` uses a UAF-derived u16 index against a single `unsigned long`, yielding an out-of-bounds bit clear up to ~8 KB into and past `struct otx2_nic` (mbox state, queue and function pointers), and the stale `leaf_profile` makes firmware tear down another flow\u0027s hardware policer, silently defeating QoS/rate-limit enforcement.\nA:H - A use-after-free on a slab object combined with an out-of-bounds bit clear into the driver\u0027s private structure reliably oopses the kernel or wedges the NIC\u0027s mailbox/queue state, and the attacker can repeat it at will."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T12:06:47.202Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/5723120423a753a220b8b2954b273838b9d7e74a"
        },
        {
          "url": "https://git.kernel.org/stable/c/df2c071061ed52d2225d97b212d27ecedf456b8a"
        },
        {
          "url": "https://git.kernel.org/stable/c/c41b2941a024d4ec7c768e16ffb10a74b188fced"
        },
        {
          "url": "https://git.kernel.org/stable/c/a8a63f27c3a8a3714210d32b12fd0f16d0337414"
        },
        {
          "url": "https://git.kernel.org/stable/c/d9c70e93ec5988ab07ad2a92d9f9d12867f02c56"
        }
      ],
      "title": "octeontx2-pf: Fix potential use after free in otx2_tc_add_flow()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-39978",
    "datePublished": "2025-10-15T07:55:58.949Z",
    "dateReserved": "2025-04-16T07:20:57.150Z",
    "dateUpdated": "2026-09-08T08:42:40.637Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2025-39978",
      "date": "2026-09-17",
      "epss": "0.0015",
      "percentile": "0.04574"
    },
    "microsoft_vex": {
      "current_release_date": "2025-10-16T01:01:59.000Z",
      "cve": "CVE-2025-39978",
      "id": "msrc_CVE-2025-39978",
      "initial_release_date": "2025-10-02T00:00:00.000Z",
      "product_status:known_not_affected": "1",
      "source": "Microsoft CSAF VEX",
      "status": "final",
      "title": "octeontx2-pf: Fix potential use after free in otx2_tc_add_flow()",
      "url": "https://msrc.microsoft.com/csaf/vex/2025/msrc_cve-2025-39978.json",
      "version": "1"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2025-39978\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-10-15T08:15:35.640\",\"lastModified\":\"2026-07-30T06:24:03.817\",\"vulnStatus\":\"Deferred\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nocteontx2-pf: Fix potential use after free in otx2_tc_add_flow()\\n\\nThis code calls kfree_rcu(new_node, rcu) and then dereferences \\\"new_node\\\"\\nand then dereferences it on the next line.  Two lines later, we take\\na mutex so I don\u0027t think this is an RCU safe region.  Re-order it to do\\nthe dereferences before queuing up the free.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"68fbff68dbea35f9e6f7649dd22fce492a5aedac\",\"lessThan\":\"5723120423a753a220b8b2954b273838b9d7e74a\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"68fbff68dbea35f9e6f7649dd22fce492a5aedac\",\"lessThan\":\"df2c071061ed52d2225d97b212d27ecedf456b8a\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"68fbff68dbea35f9e6f7649dd22fce492a5aedac\",\"lessThan\":\"c41b2941a024d4ec7c768e16ffb10a74b188fced\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"68fbff68dbea35f9e6f7649dd22fce492a5aedac\",\"lessThan\":\"a8a63f27c3a8a3714210d32b12fd0f16d0337414\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"68fbff68dbea35f9e6f7649dd22fce492a5aedac\",\"lessThan\":\"d9c70e93ec5988ab07ad2a92d9f9d12867f02c56\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"5.14\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"5.14\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.1.155\",\"lessThanOrEqual\":\"6.1.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.6.109\",\"lessThanOrEqual\":\"6.6.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.12.50\",\"lessThanOrEqual\":\"6.12.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.16.10\",\"lessThanOrEqual\":\"6.16.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.17\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]},{\"source\":\"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e\",\"affectedData\":[{\"vendor\":\"Siemens\",\"product\":\"SIMATIC S7-1500 CPU 1518-4 PN/DP MFP\",\"defaultStatus\":\"unknown\",\"versions\":[{\"version\":\"V3.1.6\",\"lessThan\":\"*\",\"versionType\":\"custom\",\"status\":\"affected\"}]},{\"vendor\":\"Siemens\",\"product\":\"SIMATIC S7-1500 CPU 1518-4 PN/DP MFP\",\"defaultStatus\":\"unknown\",\"versions\":[{\"version\":\"V3.1.6\",\"lessThan\":\"*\",\"versionType\":\"custom\",\"status\":\"affected\"}]},{\"vendor\":\"Siemens\",\"product\":\"SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP\",\"defaultStatus\":\"unknown\",\"versions\":[{\"version\":\"V3.1.6\",\"lessThan\":\"*\",\"versionType\":\"custom\",\"status\":\"affected\"}]},{\"vendor\":\"Siemens\",\"product\":\"SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP\",\"defaultStatus\":\"unknown\",\"versions\":[{\"version\":\"V3.1.6\",\"lessThan\":\"*\",\"versionType\":\"custom\",\"status\":\"affected\"}]},{\"vendor\":\"Siemens\",\"product\":\"SIPLUS S7-1500 CPU 1518-4 PN/DP MFP\",\"defaultStatus\":\"unknown\",\"versions\":[{\"version\":\"V3.1.6\",\"lessThan\":\"*\",\"versionType\":\"custom\",\"status\":\"affected\"}]}]}],\"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}]},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/5723120423a753a220b8b2954b273838b9d7e74a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/a8a63f27c3a8a3714210d32b12fd0f16d0337414\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/c41b2941a024d4ec7c768e16ffb10a74b188fced\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/d9c70e93ec5988ab07ad2a92d9f9d12867f02c56\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/df2c071061ed52d2225d97b212d27ecedf456b8a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://cert-portal.siemens.com/productcert/html/ssa-019113.html\",\"source\":\"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e\"}]}}",
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-07-30T08:57:21+00:00",
      "cve": "CVE-2025-39978",
      "id": "CVE-2025-39978",
      "initial_release_date": "2025-10-15T00:00:00+00:00",
      "product_status:known_affected": "184",
      "product_status:known_not_affected": "90",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: octeontx2-pf: Fix potential use after free in otx2_tc_add_flow()",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-39978.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "important",
      "current_release_date": "2026-08-28T16:56:41Z",
      "cve": "CVE-2025-39978",
      "id": "CVE-2025-39978",
      "initial_release_date": "2025-10-16T23:24:32Z",
      "product_status:first_fixed": "2",
      "product_status:known_affected": "354",
      "product_status:known_not_affected": "262",
      "product_status:recommended": "660",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2025-39978",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2025-39978.json",
      "version": "50"
    }
  }
}



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…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…