{
  "id": "CVE-2025-38097",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-38097",
  "published_at": "2025-07-03T08:13:57.694Z",
  "title": "espintcp: remove encap socket caching to avoid reference leak",
  "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\nespintcp: remove encap socket caching to avoid reference leak\n\nThe current scheme for caching the encap socket can lead to reference\nleaks when we try to delete the netns.\n\nThe reference chain is: xfrm_state -\u003e enacp_sk -\u003e netns\n\nSince the encap socket is a userspace socket, it holds a reference on\nthe netns. If we delete the espintcp state (through flush or\nindividual delete) before removing the netns, the reference on the\nsocket is dropped and the netns is correctly deleted. Otherwise, the\nnetns may not be reachable anymore (if all processes within the ns\nhave terminated), so we cannot delete the xfrm state to drop its\nreference on the socket.\n\nThis patch results in a small (~2% in my tests) performance\nregression.\n\nA GC-type mechanism could be added for the socket cache, to clear\nreferences if the state hasn't been used \"recently\", but it's a lot\nmore complex than just not caching the socket.",
  "cpes": [
    "cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.15:rc1:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.15:rc2:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.15:rc3:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.15:rc4:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.15:rc5:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.15:rc6:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.15:rc7:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.8,
    "nvd": 5.5
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, \u003c e32bafd08ee35feacd47b05cc5bfe9cd9659cd25",
          "\u003e= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, \u003c 9673ca00e6c5503069dc98780e2e89db0e663c16",
          "\u003e= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, \u003c e4cde54b46a87231c77256a633be1bef62687d69",
          "\u003e= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, \u003c b58a295d10065960bcb9d60cb8ca6ead9837cd27",
          "\u003e= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, \u003c 9cbca30102028f9ad3d2098f935c4368f581fd07",
          "\u003e= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, \u003c 74fd327767fb784c5875cf7c4ba1217f26020943",
          "\u003e= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, \u003c 028363685bd0b7a19b4a820f82dd905b1dc83999"
        ],
        "fixed_in": [
          "e32bafd08ee35feacd47b05cc5bfe9cd9659cd25",
          "9673ca00e6c5503069dc98780e2e89db0e663c16",
          "e4cde54b46a87231c77256a633be1bef62687d69",
          "b58a295d10065960bcb9d60cb8ca6ead9837cd27",
          "9cbca30102028f9ad3d2098f935c4368f581fd07",
          "74fd327767fb784c5875cf7c4ba1217f26020943",
          "028363685bd0b7a19b4a820f82dd905b1dc83999"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "5.6"
        ],
        "fixed_in": [
          "0",
          "5.10.270",
          "5.15.221",
          "6.1.141",
          "6.6.93",
          "6.12.31",
          "6.14.9",
          "6.15"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to e32bafd08ee35feacd47b05cc5bfe9cd9659cd25 or 9673ca00e6c5503069dc98780e2e89db0e663c16 or e4cde54b46a87231c77256a633be1bef62687d69 or b58a295d10065960bcb9d60cb8ca6ead9837cd27 or 9cbca30102028f9ad3d2098f935c4368f581fd07 or 74fd327767fb784c5875cf7c4ba1217f26020943 or 028363685bd0b7a19b4a820f82dd905b1dc83999 or later.",
      "Upgrade Linux to 0 or 5.10.270 or 5.15.221 or 6.1.141 or 6.6.93 or 6.12.31 or 6.14.9 or 6.15 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
