{
  "schemaVersion": 1,
  "attribution": [
    {
      "source": "CISA Known Exploited Vulnerabilities",
      "url": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog",
      "licence": "US government work"
    },
    {
      "source": "GitHub Advisory Database",
      "url": "https://github.com/advisories",
      "licence": "CC BY 4.0"
    },
    {
      "source": "Have I Been Pwned",
      "url": "https://haveibeenpwned.com/",
      "licence": "CC BY 4.0"
    },
    {
      "source": "CVE Program (CVE records)",
      "url": "https://www.cve.org/Legal/TermsOfUse",
      "licence": "CVE Terms of Use",
      "notice": "Copyright © 1999-2026, The MITRE Corporation. CVE is a trademark and the CVE logo is a registered trademark of The MITRE Corporation.",
      "terms": "CVE Usage: MITRE hereby grants you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Common Vulnerabilities and Exposures (CVE™). Any copy you make for such purposes is authorized provided that you reproduce MITRE's copyright designation and this license in any such copy."
    },
    {
      "source": "FIRST EPSS",
      "url": "https://www.first.org/epss/",
      "licence": "free to use; FIRST requests attribution"
    }
  ],
  "record": {
    "id": "CVE-2025-40256",
    "sourceURL": "https://www.cve.org/CVERecord?id=CVE-2025-40256",
    "idYear": 2025,
    "status": "PUBLISHED",
    "publishedAt": "2025-12-04T16:08:17.756Z",
    "updatedAt": "2026-05-11T21:45:48.998Z",
    "importedAt": "2026-10-24T01:57:34.152Z",
    "snapshot": {
      "id": "cve_2026-10-24_midnight_baseline",
      "at": "2026-10-24T00:00:00.000Z",
      "source": "https://github.com/CVEProject/cvelistV5/releases/tag/cve_2026-10-24_0100Z"
    },
    "facts": {
      "title": "xfrm: also call xfrm_state_delete_tunnel at destroy time for states that were never added",
      "summary": "In the Linux kernel, the following vulnerability has been resolved:\n\nxfrm: also call xfrm_state_delete_tunnel at destroy time for states that were never added\n\nIn commit b441cf3f8c4b (\"xfrm: delete x->tunnel as we delete x\"), I\nmissed the case where state creation fails between full\ninitialization (->init_state has been called) and being inserted on\nthe lists.\n\nIn this situation, ->init_state has been called, so for IPcomp\ntunnels, the fallback tunnel has been created and added onto the\nlists, but the user state never gets added, because we fail before\nthat. The user state doesn't go through __xfrm_state_delete, so we\ndon't call xfrm_state_delete_tunnel for those states, and we end up\nleaking the FB tunnel.\n\nThere are several codepaths affected by this: the add/update paths, in\nboth net/key and xfrm, and the migrate code (xfrm_migrate,\nxfrm_state_migrate). A \"proper\" rollback of the init_state work would\nprobably be doable in the add/update code, but for migrate it gets\nmore complicated as multiple states may be involved.\n\nAt some point, the new (not-inserted) state will be destroyed, so call\nxfrm_state_delete_tunnel during xfrm_state_gc_destroy. Most states\nwill have their fallback tunnel cleaned up during __xfrm_state_delete,\nwhich solves the issue that b441cf3f8c4b (and other patches before it)\naimed at. All states (including FB tunnels) will be removed from the\nlists once xfrm_state_fini has called flush_work(&xfrm_state_gc_work).",
      "affected": [
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "unaffected",
          "versions": [
            {
              "version": "1b28a7fae0128fa140a7dccd995182ff6cd1c67b",
              "status": "affected",
              "versionType": "git",
              "lessThan": "57b72d74d4651dc19d046308a8304eb9abfe66ac"
            },
            {
              "version": "4b2c17d0f9be8b58bb30468bc81a4b61c985b04e",
              "status": "affected",
              "versionType": "git",
              "lessThan": "1dad653643f28ccc89be93f9440b8804cded85b2"
            },
            {
              "version": "0da961fa46da1b37ef868d9b603bd202136f8f8e",
              "status": "affected",
              "versionType": "git",
              "lessThan": "64441724387b4ac92f67ef51caaaeffe99c950d1"
            },
            {
              "version": "d0e0d1097118461463b76562c7ebaabaa5b90b13",
              "status": "affected",
              "versionType": "git",
              "lessThan": "763e5c351206c1e4d910db4a1159053f6263689c"
            },
            {
              "version": "dc3636912d41770466543623cb76e7b88fdb42c7",
              "status": "affected",
              "versionType": "git",
              "lessThan": "f7d879c19d306512c2e260f37e8a3e5c85e37c50"
            },
            {
              "version": "b441cf3f8c4b8576639d20c8eb4aa32917602ecd",
              "status": "affected",
              "versionType": "git",
              "lessThan": "d6fe5c740c573af10943b8353992e1325cdb2715"
            },
            {
              "version": "b441cf3f8c4b8576639d20c8eb4aa32917602ecd",
              "status": "affected",
              "versionType": "git",
              "lessThan": "10deb69864840ccf96b00ac2ab3a2055c0c04721"
            }
          ]
        },
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "affected",
          "versions": [
            {
              "version": "6.16",
              "status": "affected"
            },
            {
              "version": "0",
              "status": "unaffected",
              "versionType": "semver",
              "lessThan": "6.16"
            },
            {
              "version": "6.17.10",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "6.17.*"
            },
            {
              "version": "6.18",
              "status": "unaffected",
              "versionType": "original_commit_for_fix",
              "lessThanOrEqual": "*"
            }
          ]
        }
      ]
    }
  }
}