CVE-2025-38097

MEDIUM

Linux Kernel 5.6-6.1.140 6.2-6.6.92 6.7-6.12.30 6.13-6.14.8 - Reference Leak via ESP-in-TCP Encap Socket Caching

Title source: llm
STIX 2.1

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.

Scores

CVSS v3 5.5
EPSS 0.0010
EPSS Percentile 27.4%
Attack Vector LOCAL
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Details

Status published
Products (19)
debian/debian_linux 11.0
linux/Kernel 5.6.0 - 6.1.141linux
linux/Kernel 6.13.0 - 6.14.9linux
linux/Kernel 6.2.0 - 6.6.93linux
linux/Kernel 6.7.0 - 6.12.31linux
Linux/Linux < 5.6
Linux/Linux 5.6
Linux/Linux 6.1.141 - 6.1.*
Linux/Linux 6.12.31 - 6.12.*
Linux/Linux 6.14.9 - 6.14.*
... and 9 more
Published Jul 03, 2025
Tracked Since Feb 18, 2026