{
  "id": "CVE-2025-21864",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-21864",
  "published_at": "2025-03-12T09:42:21.223Z",
  "title": "tcp: drop secpath at the same time as we currently drop dst",
  "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": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\ntcp: drop secpath at the same time as we currently drop dst\n\nXiumei reported hitting the WARN in xfrm6_tunnel_net_exit while\nrunning tests that boil down to:\n - create a pair of netns\n - run a basic TCP test over ipcomp6\n - delete the pair of netns\n\nThe xfrm_state found on spi_byaddr was not deleted at the time we\ndelete the netns, because we still have a reference on it. This\nlingering reference comes from a secpath (which holds a ref on the\nxfrm_state), which is still attached to an skb. This skb is not\nleaked, it ends up on sk_receive_queue and then gets defer-free'd by\nskb_attempt_defer_free.\n\nThe problem happens when we defer freeing an skb (push it on one CPU's\ndefer_list), and don't flush that list before the netns is deleted. In\nthat case, we still have a reference on the xfrm_state that we don't\nexpect at this point.\n\nWe already drop the skb's dst in the TCP receive path when it's no\nlonger needed, so let's also drop the secpath. At this point,\ntcp_filter has already called into the LSM hooks that may require the\nsecpath, so it should not be needed anymore. However, in some of those\nplaces, the MPTCP extension has just been attached to the skb, so we\ncannot simply drop all extensions.",
  "cwe": "CWE-476",
  "cpes": [
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.14:rc1:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.14:rc2:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.14:rc3:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cisa-adp": 5.5,
    "cna": 7.8,
    "nvd": 5.5
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 68822bdf76f10c3dc80609d4e2cdc1e847429086, \u003c 87858bbf21da239ace300d61dd209907995c0491",
          "\u003e= 68822bdf76f10c3dc80609d4e2cdc1e847429086, \u003c f1d5e6a5e468308af7759cf5276779d3155c5e98",
          "\u003e= 68822bdf76f10c3dc80609d4e2cdc1e847429086, \u003c cd34a07f744451e2ecf9005bb7d24d0b2fb83656",
          "\u003e= 68822bdf76f10c3dc80609d4e2cdc1e847429086, \u003c 69cafd9413084cd5012cf5d7c7ec6f3d493726d9",
          "\u003e= 68822bdf76f10c3dc80609d4e2cdc1e847429086, \u003c 9b6412e6979f6f9e0632075f8f008937b5cd4efd"
        ],
        "fixed_in": [
          "87858bbf21da239ace300d61dd209907995c0491",
          "f1d5e6a5e468308af7759cf5276779d3155c5e98",
          "cd34a07f744451e2ecf9005bb7d24d0b2fb83656",
          "69cafd9413084cd5012cf5d7c7ec6f3d493726d9",
          "9b6412e6979f6f9e0632075f8f008937b5cd4efd"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "5.19"
        ],
        "fixed_in": [
          "0",
          "6.1.130",
          "6.6.80",
          "6.12.17",
          "6.13.5",
          "6.14"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to 87858bbf21da239ace300d61dd209907995c0491 or f1d5e6a5e468308af7759cf5276779d3155c5e98 or cd34a07f744451e2ecf9005bb7d24d0b2fb83656 or 69cafd9413084cd5012cf5d7c7ec6f3d493726d9 or 9b6412e6979f6f9e0632075f8f008937b5cd4efd or later.",
      "Upgrade Linux to 0 or 6.1.130 or 6.6.80 or 6.12.17 or 6.13.5 or 6.14 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
