{
  "id": "CVE-2025-39965",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-39965",
  "published_at": "2025-10-13T13:48:31.033Z",
  "title": "xfrm: xfrm_alloc_spi shouldn't use 0 as SPI",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": {
    "created_at": "2025-10-17T17:49:10Z",
    "first_seen_at": "2026-11-14T11:25:11.578Z",
    "days_after_publication": 4.2,
    "repo": "Shreyas-Penkar/CVE-2025-39965",
    "source": "github"
  },
  "poc_repo_count": 1,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\nxfrm: xfrm_alloc_spi shouldn't use 0 as SPI\n\nx-\u003eid.spi == 0 means \"no SPI assigned\", but since commit\n94f39804d891 (\"xfrm: Duplicate SPI Handling\"), we now create states\nand add them to the byspi list with this value.\n\n__xfrm_state_delete doesn't remove those states from the byspi list,\nsince they shouldn't be there, and this shows up as a UAF the next\ntime we go through the byspi list.",
  "cpes": [
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc1:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc2:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc3:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc4:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc5:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc6:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc7:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.8,
    "nvd": 5.5
  },
  "repos": [
    {
      "repo": "Shreyas-Penkar/CVE-2025-39965",
      "url": "https://github.com/Shreyas-Penkar/CVE-2025-39965",
      "created_at": "2025-10-17T17:49:10Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 10,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2020-03-09T14:18:28Z"
    }
  ],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 3d8090bb53424432fa788fe9a49e8ceca74f0544, \u003c 0baf92d0b1590b903c1f4ead75e61715e50e8146",
          "\u003e= 2fc5b54368a1bf1d2d74b4d3b8eea5309a653e38, \u003c 9fcedabaae0096f712bbb4ccca6a8538af1cd1c8",
          "\u003e= 29e9158f91f99057dbd35db5e8674d93b38549fe, \u003c a78e55776522373c446f18d5002a8de4b09e6bf7",
          "\u003e= 94f39804d891cffe4ce17737d295f3b195bc7299, \u003c cd8ae32e4e4652db55bce6b9c79267d8946765a9",
          "fb58962aa3b9359988c7b5b15a971fd9ad5b0ecd",
          "c67d4e7a8f90fb6361ca89d4d5c9a28f4e935e47",
          "\u003e= 6.1.191, \u003c 6.2",
          "\u003e= 6.15.11, \u003c 6.16"
        ],
        "fixed_in": [
          "0baf92d0b1590b903c1f4ead75e61715e50e8146",
          "9fcedabaae0096f712bbb4ccca6a8538af1cd1c8",
          "a78e55776522373c446f18d5002a8de4b09e6bf7",
          "cd8ae32e4e4652db55bce6b9c79267d8946765a9",
          "6.2",
          "6.16"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 6.6.103, \u003c 6.6.109",
          "\u003e= 6.12.43, \u003c 6.12.50",
          "\u003e= 6.16.2, \u003c 6.16.10"
        ],
        "fixed_in": [
          "6.6.109",
          "6.12.50",
          "6.16.10"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to 0baf92d0b1590b903c1f4ead75e61715e50e8146 or 9fcedabaae0096f712bbb4ccca6a8538af1cd1c8 or a78e55776522373c446f18d5002a8de4b09e6bf7 or cd8ae32e4e4652db55bce6b9c79267d8946765a9 or 6.2 or 6.16 or later.",
      "Upgrade Linux to 6.6.109 or 6.12.50 or 6.16.10 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
