CVE-2025-38097
published high CVSS 3.1 · 7.8espintcp: remove encap socket caching to avoid reference leak
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linuxe27cca96cd68fa2c6814c90f9a1cfd36bb68c593 to < e32bafd08ee35feacd47b05cc5bfe9cd9659cd25 · e27cca96cd68fa2c6814c90f9a1cfd36bb68c593 to < 9673ca00e6c5503069dc98780e2e89db0e663c16 · e27cca96cd68fa2c6814c90f9a1cfd36bb68c593 to < e4cde54b46a87231c77256a633be1bef62687d69 · e27cca96cd68fa2c6814c90f9a1cfd36bb68c593 to < b58a295d10065960bcb9d60cb8ca6ead9837cd27 · e27cca96cd68fa2c6814c90f9a1cfd36bb68c593 to < 9cbca30102028f9ad3d2098f935c4368f581fd07 · e27cca96cd68fa2c6814c90f9a1cfd36bb68c593 to < 74fd327767fb784c5875cf7c4ba1217f26020943 · e27cca96cd68fa2c6814c90f9a1cfd36bb68c593 to < 028363685bd0b7a19b4a820f82dd905b1dc83999 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux5.6 (affected) · 0 to < 5.6 (unaffected · semver) · 5.10.270 through 5.10.* (unaffected · semver) · 5.15.221 through 5.15.* (unaffected · semver) · 6.1.141 through 6.1.* (unaffected · semver) · 6.6.93 through 6.6.* (unaffected · semver) · 6.12.31 through 6.12.* (unaffected · semver) · 6.14.9 through 6.14.* (unaffected · semver) · 6.15 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected; No Fix Planned | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluationALAS2023-2025-1037 | Fixed | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluationALAS2023-2025-1052 | Fixed | Not stated | Amazon Linux assessment |
| AlmaLinux | 10 | kernel-abi-stablelists | Advisory build | 6.12.0-211.7.1.el10_2 | ALSA-2026:18134 |
| Debian | bookworm | linux | Advisory build | 6.1.147-1 | DSA-5973-1 |
| Oracle Linux | 10 | kernelx86_64 | Advisory build | 0:6.12.0-211.34.1.el10_2 | ELSA-2026-18134 |
Show 97 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| AlmaLinux | 10 | kernel-doc | Advisory build | 6.12.0-211.7.1.el10_2 | ALSA-2026:18134 |
| AlmaLinux | 9 | kernel | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-64k | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-64k-core | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-64k-debug | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-64k-debug-core | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-64k-debug-devel | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-64k-debug-devel-matched | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-64k-debug-modules | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-64k-debug-modules-core | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-64k-debug-modules-extra | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-64k-devel | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-64k-devel-matched | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-64k-modules | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-64k-modules-core | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-64k-modules-extra | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-abi-stablelists | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-core | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-cross-headers | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-debug | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-debug-core | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-debug-devel | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-debug-devel-matched | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-debug-modules | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-debug-modules-core | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-debug-modules-extra | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-debug-uki-virt | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-devel | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-devel-matched | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-doc | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-headers | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-modules | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-modules-core | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-modules-extra | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-rt | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-rt-64k | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-rt-64k-core | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-rt-64k-debug | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-rt-64k-debug-core | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-rt-64k-debug-devel | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-rt-64k-debug-modules | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-rt-64k-debug-modules-core | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-rt-64k-debug-modules-extra | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-rt-64k-devel | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-rt-64k-modules | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-rt-64k-modules-core | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-rt-64k-modules-extra | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-rt-core | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-rt-debug | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-rt-debug-core | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-rt-debug-devel | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-rt-debug-modules | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-rt-debug-modules-core | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-rt-debug-modules-extra | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-rt-devel | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-rt-modules | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-rt-modules-core | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-rt-modules-extra | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-tools | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-tools-libs | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-tools-libs-devel | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-uki-virt | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-uki-virt-addons | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-zfcpdump | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-zfcpdump-core | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-zfcpdump-devel | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-zfcpdump-devel-matched | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-zfcpdump-modules | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-zfcpdump-modules-core | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | kernel-zfcpdump-modules-extra | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | libperf | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | perf | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | python3-perf | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | rtla | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| AlmaLinux | 9 | rv | Advisory build | 5.14.0-687.5.1.el9_8 | ALSA-2026:18587 |
| Debian | bullseye | linux-6.1 | Advisory build | 6.1.153-1~deb11u1 | DLA-4328-1 |
| Oracle Linux | 10 | kernel-abi-stablelistsx86_64 | Advisory build | 0:6.12.0-211.34.1.el10_2 | ELSA-2026-18134 |
| Oracle Linux | 10 | kernel-corex86_64 | Advisory build | 0:6.12.0-211.34.1.el10_2 | ELSA-2026-18134 |
| Oracle Linux | 10 | kernel-cross-headersaarch64 | Advisory build | 0:6.12.0-211.34.1.el10_2 | ELSA-2026-18134 |
| Oracle Linux | 10 | kernel-cross-headersx86_64 | Advisory build | 0:6.12.0-211.34.1.el10_2 | ELSA-2026-18134 |
| Oracle Linux | 10 | kernel-debugx86_64 | Advisory build | 0:6.12.0-211.34.1.el10_2 | ELSA-2026-18134 |
| Oracle Linux | 10 | kernel-debug-corex86_64 | Advisory build | 0:6.12.0-211.34.1.el10_2 | ELSA-2026-18134 |
| Oracle Linux | 10 | kernel-debug-develx86_64 | Advisory build | 0:6.12.0-211.34.1.el10_2 | ELSA-2026-18134 |
| Oracle Linux | 10 | kernel-debug-devel-matchedx86_64 | Advisory build | 0:6.12.0-211.34.1.el10_2 | ELSA-2026-18134 |
| Oracle Linux | 10 | kernel-debug-modulesx86_64 | Advisory build | 0:6.12.0-211.34.1.el10_2 | ELSA-2026-18134 |
| Oracle Linux | 10 | kernel-debug-modules-corex86_64 | Advisory build | 0:6.12.0-211.34.1.el10_2 | ELSA-2026-18134 |
| Oracle Linux | 10 | kernel-debug-modules-extrax86_64 | Advisory build | 0:6.12.0-211.34.1.el10_2 | ELSA-2026-18134 |
| Oracle Linux | 10 | kernel-debug-uki-virtx86_64 | Advisory build | 0:6.12.0-211.34.1.el10_2 | ELSA-2026-18134 |
| Oracle Linux | 10 | kernel-develx86_64 | Advisory build | 0:6.12.0-211.34.1.el10_2 | ELSA-2026-18134 |
| Oracle Linux | 10 | kernel-devel-matchedx86_64 | Advisory build | 0:6.12.0-211.34.1.el10_2 | ELSA-2026-18134 |
| Oracle Linux | 10 | kernel-docx86_64 | Advisory build | 0:6.12.0-211.34.1.el10_2 | ELSA-2026-18134 |
| Oracle Linux | 10 | kernel-headersaarch64 | Advisory build | 0:6.12.0-211.34.1.el10_2 | ELSA-2026-18134 |
| Oracle Linux | 10 | kernel-headersx86_64 | Advisory build | 0:6.12.0-211.34.1.el10_2 | ELSA-2026-18134 |
| Oracle Linux | 10 | kernel-modulesx86_64 | Advisory build | 0:6.12.0-211.34.1.el10_2 | ELSA-2026-18134 |
| Oracle Linux | 10 | kernel-modules-corex86_64 | Advisory build | 0:6.12.0-211.34.1.el10_2 | ELSA-2026-18134 |
| Oracle Linux | 10 | kernel-modules-extrax86_64 | Advisory build | 0:6.12.0-211.34.1.el10_2 | ELSA-2026-18134 |
| Oracle Linux | 10 | kernel-modules-extra-matchedx86_64 | Advisory build | 0:6.12.0-211.34.1.el10_2 | ELSA-2026-18134 |
Package entries are limited to the first 100 builds and 100 linked advisories.
Description
In the Linux kernel, the following vulnerability has been resolved: espintcp: remove encap socket caching to avoid reference leak The current scheme for caching the encap socket can lead to reference leaks when we try to delete the netns. The reference chain is: xfrm_state -> enacp_sk -> netns Since the encap socket is a userspace socket, it holds a reference on the netns. If we delete the espintcp state (through flush or individual delete) before removing the netns, the reference on the socket is dropped and the netns is correctly deleted. Otherwise, the netns may not be reachable anymore (if all processes within the ns have terminated), so we cannot delete the xfrm state to drop its reference on the socket. This patch results in a small (~2% in my tests) performance regression. A GC-type mechanism could be added for the socket cache, to clear references if the state hasn't been used "recently", but it's a lot more complex than just not caching the socket.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - The entire attack is driven through local syscalls — `socket()`+`setsockopt(TCP_ULP,"espintcp")` to create the encap socket, NETLINK_XFRM to add/flush the SA and policy, and local traffic to trigger `esp_output_tail_tcp()`. No remote peer input is needed to populate or tear down the cached socket reference. AC:L - The reference leak itself is fully deterministic — create the SA, send one packet, let the namespace go away — with no race or memory-layout dependency, and `CONFIG_INET_ESPINTCP`/`CONFIG_INET6_ESPINTCP` are enabled in mainstream distro kernels. For the dangling-`encap_sk` window the attacker drives both sides (a traffic generator feeding `xfrm_trans_queue_net()` and a concurrent `xfrm state flush` loop) and can retry indefinitely. PR:L - Adding the xfrm state requires CAP_NET_ADMIN, but `xfrm_user.c` uses `netlink_net_capable()`, which resolves against `sock_net(skb->sk)->user_ns`, so an ordinary unprivileged user obtains it with `unshare -Urn`; attaching the espintcp ULP requires no privilege at all. No real root in the init namespace is needed. UI:N - The attacker performs every step — socket setup, SA installation, packet transmission, and namespace teardown — entirely on their own. No victim action or cooperating process is involved. S:U - The leaked netns/socket and the dangling socket dereference are all kernel objects under the same security authority as the attacking context; no VM, IOMMU, or hypervisor boundary is crossed. C:H - After `__xfrm_state_delete()` drops the socket reference without RCU synchronization and leaves `x->encap_sk` non-NULL, the deferred `esp_find_tcp_sk()` reads `sk->sk_state` and then operates on that released socket; because TCP sockets come from a SLAB_TYPESAFE_BY_RCU cache the slot can already hold an attacker-groomed socket, and `espintcp_getctx()` then follows a foreign `icsk_ulp_data`, giving a use-after-free read primitive over attacker-influenced kernel memory. I:H - The stale `x->encap_sk` also lets the slow path match `sk == nsk` and queue a second `sock_put()` through `call_rcu(esp_free_tcp_sk)`, a refcount underflow that frees a socket userspace still references by fd — a classic UAF write/heap-grooming primitive, and `bh_lock_sock()`/`espintcp_push_skb()` write into the freed object directly. A:H - Each leaked SA permanently pins an entire `struct net` (with all per-net subsystem allocations, sysctls, procfs entries and per-cpu data) that can never be reclaimed, and an unprivileged user can repeat this in a loop until kernel memory is exhausted or netns ucount limits break container creation; the dangling-socket dereference additionally oopses the kernel.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | e27cca96cd68fa2c6814c90f9a1cfd36bb68c593 to < e32bafd08ee35feacd47b05cc5bfe9cd9659cd25 (affected · git)e27cca96cd68fa2c6814c90f9a1cfd36bb68c593 to < 9673ca00e6c5503069dc98780e2e89db0e663c16 (affected · git)e27cca96cd68fa2c6814c90f9a1cfd36bb68c593 to < e4cde54b46a87231c77256a633be1bef62687d69 (affected · git)e27cca96cd68fa2c6814c90f9a1cfd36bb68c593 to < b58a295d10065960bcb9d60cb8ca6ead9837cd27 (affected · git)e27cca96cd68fa2c6814c90f9a1cfd36bb68c593 to < 9cbca30102028f9ad3d2098f935c4368f581fd07 (affected · git)e27cca96cd68fa2c6814c90f9a1cfd36bb68c593 to < 74fd327767fb784c5875cf7c4ba1217f26020943 (affected · git)e27cca96cd68fa2c6814c90f9a1cfd36bb68c593 to < 028363685bd0b7a19b4a820f82dd905b1dc83999 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 5.6 (affected)0 to < 5.6 (unaffected · semver)5.10.270 through 5.10.* (unaffected · semver)5.15.221 through 5.15.* (unaffected · semver)6.1.141 through 6.1.* (unaffected · semver)6.6.93 through 6.6.* (unaffected · semver)6.12.31 through 6.12.* (unaffected · semver)6.14.9 through 6.14.* (unaffected · semver)6.15 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
8- https://git.kernel.org/stable/c/028363685bd0b7a19b4a820f82dd905b1dc83999
- https://git.kernel.org/stable/c/74fd327767fb784c5875cf7c4ba1217f26020943
- https://git.kernel.org/stable/c/9673ca00e6c5503069dc98780e2e89db0e663c16
- https://git.kernel.org/stable/c/9cbca30102028f9ad3d2098f935c4368f581fd07
- https://git.kernel.org/stable/c/b58a295d10065960bcb9d60cb8ca6ead9837cd27
- https://git.kernel.org/stable/c/e32bafd08ee35feacd47b05cc5bfe9cd9659cd25
- https://git.kernel.org/stable/c/e4cde54b46a87231c77256a633be1bef62687d69
- https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html
Provider assertions
3Linux · cna
espintcp: remove encap socket caching to avoid reference leak
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 714593853831c58ad32aed61bf36994de25aa48ba107716f5f3cd97582cb5b8f
- Ingested
- 15 Oct 2026, 23:26:24 UTC
- Source record
- Official CVE record