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

CVE-2025-38069 (GCVE-0-2025-38069)

Vulnerability from cvelistv5 – Published: 2025-06-18 09:33 – Updated: 2026-05-11 21:20
VLAI
Title
PCI: endpoint: pci-epf-test: Fix double free that causes kernel to oops
Summary
In the Linux kernel, the following vulnerability has been resolved: PCI: endpoint: pci-epf-test: Fix double free that causes kernel to oops Fix a kernel oops found while testing the stm32_pcie Endpoint driver with handling of PERST# deassertion: During EP initialization, pci_epf_test_alloc_space() allocates all BARs, which are further freed if epc_set_bar() fails (for instance, due to no free inbound window). However, when pci_epc_set_bar() fails, the error path: pci_epc_set_bar() -> pci_epf_free_space() does not clear the previous assignment to epf_test->reg[bar]. Then, if the host reboots, the PERST# deassertion restarts the BAR allocation sequence with the same allocation failure (no free inbound window), creating a double free situation since epf_test->reg[bar] was deallocated and is still non-NULL. Thus, make sure that pci_epf_alloc_space() and pci_epf_free_space() invocations are symmetric, and as such, set epf_test->reg[bar] to NULL when memory is freed. [kwilczynski: commit log]
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 349e7a85b25fa6ee82902d9be2cc5f3bec815120 , < fe2329eff5bee461ebcafadb6ca1df0cbf5945fd (git)
Affected: 349e7a85b25fa6ee82902d9be2cc5f3bec815120 , < 8b83893d1f6c6061a7d58169ecdf9d5ee9f306ee (git)
Affected: 349e7a85b25fa6ee82902d9be2cc5f3bec815120 , < 934e9d137d937706004c325fa1474f9e3f1ba10a (git)
guessed Create a notification for this product.
Linux Linux Affected: 4.12
Unaffected: 0 , < 4.12 (semver)
Unaffected: 6.12.31 , ≤ 6.12.* (semver)
Unaffected: 6.14.9 , ≤ 6.14.* (semver)
Unaffected: 6.15 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/pci/endpoint/functions/pci-epf-test.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "fe2329eff5bee461ebcafadb6ca1df0cbf5945fd",
              "status": "affected",
              "version": "349e7a85b25fa6ee82902d9be2cc5f3bec815120",
              "versionType": "git"
            },
            {
              "lessThan": "8b83893d1f6c6061a7d58169ecdf9d5ee9f306ee",
              "status": "affected",
              "version": "349e7a85b25fa6ee82902d9be2cc5f3bec815120",
              "versionType": "git"
            },
            {
              "lessThan": "934e9d137d937706004c325fa1474f9e3f1ba10a",
              "status": "affected",
              "version": "349e7a85b25fa6ee82902d9be2cc5f3bec815120",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/pci/endpoint/functions/pci-epf-test.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "4.12"
            },
            {
              "lessThan": "4.12",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.31",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.14.*",
              "status": "unaffected",
              "version": "6.14.9",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.15",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.31",
                  "versionStartIncluding": "4.12",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.14.9",
                  "versionStartIncluding": "4.12",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.15",
                  "versionStartIncluding": "4.12",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nPCI: endpoint: pci-epf-test: Fix double free that causes kernel to oops\n\nFix a kernel oops found while testing the stm32_pcie Endpoint driver\nwith handling of PERST# deassertion:\n\nDuring EP initialization, pci_epf_test_alloc_space() allocates all BARs,\nwhich are further freed if epc_set_bar() fails (for instance, due to no\nfree inbound window).\n\nHowever, when pci_epc_set_bar() fails, the error path:\n\n  pci_epc_set_bar() -\u003e\n    pci_epf_free_space()\n\ndoes not clear the previous assignment to epf_test-\u003ereg[bar].\n\nThen, if the host reboots, the PERST# deassertion restarts the BAR\nallocation sequence with the same allocation failure (no free inbound\nwindow), creating a double free situation since epf_test-\u003ereg[bar] was\ndeallocated and is still non-NULL.\n\nThus, make sure that pci_epf_alloc_space() and pci_epf_free_space()\ninvocations are symmetric, and as such, set epf_test-\u003ereg[bar] to NULL\nwhen memory is freed.\n\n[kwilczynski: commit log]"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-05-11T21:20:40.239Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/fe2329eff5bee461ebcafadb6ca1df0cbf5945fd"
        },
        {
          "url": "https://git.kernel.org/stable/c/8b83893d1f6c6061a7d58169ecdf9d5ee9f306ee"
        },
        {
          "url": "https://git.kernel.org/stable/c/934e9d137d937706004c325fa1474f9e3f1ba10a"
        }
      ],
      "title": "PCI: endpoint: pci-epf-test: Fix double free that causes kernel to oops",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-38069",
    "datePublished": "2025-06-18T09:33:46.711Z",
    "dateReserved": "2025-04-16T04:51:23.980Z",
    "dateUpdated": "2026-05-11T21:20:40.239Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2025-38069",
      "date": "2026-09-17",
      "epss": "0.00171",
      "percentile": "0.06781"
    },
    "microsoft_vex": {
      "current_release_date": "2025-11-25T01:37:12.000Z",
      "cve": "CVE-2025-38069",
      "id": "msrc_CVE-2025-38069",
      "initial_release_date": "2025-06-02T00:00:00.000Z",
      "product_status:known_not_affected": "2",
      "product_status:under_investigation": "2",
      "source": "Microsoft CSAF VEX",
      "status": "final",
      "title": "PCI: endpoint: pci-epf-test: Fix double free that causes kernel to oops",
      "url": "https://msrc.microsoft.com/csaf/vex/2025/msrc_cve-2025-38069.json",
      "version": "2"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2025-38069\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-06-18T10:15:40.090\",\"lastModified\":\"2026-06-17T09:15:59.613\",\"vulnStatus\":\"Analyzed\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nPCI: endpoint: pci-epf-test: Fix double free that causes kernel to oops\\n\\nFix a kernel oops found while testing the stm32_pcie Endpoint driver\\nwith handling of PERST# deassertion:\\n\\nDuring EP initialization, pci_epf_test_alloc_space() allocates all BARs,\\nwhich are further freed if epc_set_bar() fails (for instance, due to no\\nfree inbound window).\\n\\nHowever, when pci_epc_set_bar() fails, the error path:\\n\\n  pci_epc_set_bar() -\u003e\\n    pci_epf_free_space()\\n\\ndoes not clear the previous assignment to epf_test-\u003ereg[bar].\\n\\nThen, if the host reboots, the PERST# deassertion restarts the BAR\\nallocation sequence with the same allocation failure (no free inbound\\nwindow), creating a double free situation since epf_test-\u003ereg[bar] was\\ndeallocated and is still non-NULL.\\n\\nThus, make sure that pci_epf_alloc_space() and pci_epf_free_space()\\ninvocations are symmetric, and as such, set epf_test-\u003ereg[bar] to NULL\\nwhen memory is freed.\\n\\n[kwilczynski: commit log]\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: PCI: endpoint: pci-epf-test: Se corrige la doble liberaci\u00f3n que provoca un error en el kernel. Se corrige un error en el kernel detectado al probar el controlador de endpoint stm32_pcie con el manejo de la deaserci\u00f3n PERST#: Durante la inicializaci\u00f3n de EP, pci_epf_test_alloc_space() asigna todos los BAR, que se liberan a\u00fan m\u00e1s si epc_set_bar() falla (por ejemplo, debido a que no hay una ventana de entrada libre). Sin embargo, cuando pci_epc_set_bar() falla, la ruta de error: pci_epc_set_bar() -\u0026gt; pci_epf_free_space() no borra la asignaci\u00f3n previa a epf_test-\u0026gt;reg[bar]. Luego, si el host se reinicia, la desasignaci\u00f3n PERST# reinicia la secuencia de asignaci\u00f3n de BAR con el mismo fallo de asignaci\u00f3n (sin ventana de entrada libre), lo que crea una situaci\u00f3n de doble liberaci\u00f3n, ya que epf_test-\u0026gt;reg[bar] se desasign\u00f3 y sigue siendo distinto de NULL. Por lo tanto, aseg\u00farese de que las invocaciones de pci_epf_alloc_space() y pci_epf_free_space() sean sim\u00e9tricas y, por lo tanto, establezca epf_test-\u0026gt;reg[bar] en NULL cuando se libere memoria. [kwilczynski: registro de confirmaciones]\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"drivers/pci/endpoint/functions/pci-epf-test.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"349e7a85b25fa6ee82902d9be2cc5f3bec815120\",\"lessThan\":\"fe2329eff5bee461ebcafadb6ca1df0cbf5945fd\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"349e7a85b25fa6ee82902d9be2cc5f3bec815120\",\"lessThan\":\"8b83893d1f6c6061a7d58169ecdf9d5ee9f306ee\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"349e7a85b25fa6ee82902d9be2cc5f3bec815120\",\"lessThan\":\"934e9d137d937706004c325fa1474f9e3f1ba10a\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"drivers/pci/endpoint/functions/pci-epf-test.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"4.12\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"4.12\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.12.31\",\"lessThanOrEqual\":\"6.12.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.14.9\",\"lessThanOrEqual\":\"6.14.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.15\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"metrics\":{\"cvssMetricV31\":[{\"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: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}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-415\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionEndExcluding\":\"6.12.31\",\"matchCriteriaId\":\"762BCFB6-5DF9-4665-8651-F8936F5D8FB1\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.13\",\"versionEndExcluding\":\"6.14.9\",\"matchCriteriaId\":\"A9B72DD1-715C-4101-A720-1C8D70044C06\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/8b83893d1f6c6061a7d58169ecdf9d5ee9f306ee\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/934e9d137d937706004c325fa1474f9e3f1ba10a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/fe2329eff5bee461ebcafadb6ca1df0cbf5945fd\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]}]}}",
    "redhat_vex": {
      "aggregate_severity": "None",
      "current_release_date": "2026-06-30T10:17:50+00:00",
      "cve": "CVE-2025-38069",
      "id": "CVE-2025-38069",
      "initial_release_date": "2025-06-18T00:00:00+00:00",
      "product_status:known_not_affected": "274",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: PCI: endpoint: pci-epf-test: Fix double free that causes kernel to oops",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-38069.json",
      "version": "3"
    }
  }
}



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…