CVE-2025-38097: espintcp: remove encap socket caching to avoid reference leak

Published Jul 3, 2025
·
Updated

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: xfrmstate -> enacpsk -> 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.

Affected Software

13 affected components
Linux Foundation Linux Kernel
Linux Linux kernel>=5.6<6.1.141
Linux Linux kernel>=6.2<6.6.93
Linux Linux kernel>=6.7<6.12.31
Linux Linux kernel>=6.13<6.14.9
Linux Linux kernel=6.15-rc1
Linux Linux kernel=6.15-rc2
Linux Linux kernel=6.15-rc3
Linux Linux kernel=6.15-rc4
Linux Linux kernel=6.15-rc5
Linux Linux kernel=6.15-rc6
Linux Linux kernel=6.15-rc7
Debian Debian Linux=11.0

Event History

Jul 3, 2025
CVE Published
via MITRE·08:13 AM
Data Sourced
via MITRE·08:13 AM
DescriptionSeverity
Data Sourced
via Red Hat·09:02 AM
DescriptionSeverityAffected Software
Data Sourced
via NVD·09:15 AM
RemedyDescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-38097?

CVE-2025-38097 is classified as a moderate severity vulnerability due to the potential for reference leaks in the Linux kernel.

2

How do I fix CVE-2025-38097?

To fix CVE-2025-38097, update to the latest version of the Linux kernel that includes the patches related to this vulnerability.

3

What systems are affected by CVE-2025-38097?

CVE-2025-38097 affects systems running vulnerable versions of the Linux kernel that utilize the espintcp encap socket caching.

4

What is the impact of CVE-2025-38097?

The impact of CVE-2025-38097 could lead to resource leaks, specifically reference leaks when attempting to delete network namespaces.

5

Is CVE-2025-38097 publicly known?

Yes, CVE-2025-38097 is a publicly disclosed vulnerability, and users are encouraged to address it promptly.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203