CVE-2025-38097

MediumCVSS 5.5/10Last modified Oct 15, 2026

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.

Metrics

CVSS 3.1 5.5/10CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Affected software

VendorProductVersions
LinuxLinux>= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < e32bafd08ee35feacd47b05cc5bfe9cd9659cd25; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < 9673ca00e6c5503069dc98780e2e89db0e663c16; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < e4cde54b46a87231c77256a633be1bef62687d69; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < b58a295d10065960bcb9d60cb8ca6ead9837cd27; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < 9cbca30102028f9ad3d2098f935c4368f581fd07; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < 74fd327767fb784c5875cf7c4ba1217f26020943; >= e27cca96cd68fa2c6814c90f9a1cfd36bb68c593, < 028363685bd0b7a19b4a820f82dd905b1dc83999
LinuxLinux5.6

References

Timeline

Published
Jul 3, 2025
Last modified
Oct 15, 2026
NVD status
Modified

Related CVEs from 2025

CVE-2025-380985.5In the Linux kernel, the following vulnerability has been resolved: drm/amd/display: Don't treat wb connector as physical in create_validatCVE-2025-380995.5In the Linux kernel, the following vulnerability has been resolved: Bluetooth: Disable SCO support if READ_VOICE_SETTING is unsupported/broCVE-2025-38109.8The WPBookit plugin for WordPress is vulnerable to privilege escalation via account takeover in all versions up to, and including, 1.0.2. ThCVE-2025-381005.5In the Linux kernel, the following vulnerability has been resolved: x86/iopl: Cure TIF_IO_BITMAP inconsistencies io_bitmap_exit() is invokCVE-2025-381017.8In the Linux kernel, the following vulnerability has been resolved: ring-buffer: Fix buffer locking in ring_buffer_subbuf_order_set() EnlaCVE-2025-381027.0In the Linux kernel, the following vulnerability has been resolved: VMCI: fix race between vmci_host_setup_notify and vmci_ctx_unset_notifyCVE-2025-381037.1In the Linux kernel, the following vulnerability has been resolved: HID: usbhid: Eliminate recurrent out-of-bounds bug in usbhid_parse() UCVE-2025-381044.7In the Linux kernel, the following vulnerability has been resolved: drm/amdgpu: Replace Mutex with Spinlock for RLCG register access to avoCVE-2025-381055.5In the Linux kernel, the following vulnerability has been resolved: ALSA: usb-audio: Kill timer properly at removal The USB-audio MIDI codCVE-2025-381067.8In the Linux kernel, the following vulnerability has been resolved: io_uring: fix use-after-free of sq->thread in __io_uring_show_fdinfo() CVE-2025-381077.0In the Linux kernel, the following vulnerability has been resolved: net_sched: ets: fix a race in ets_qdisc_change() Gerrard Tai reported CVE-2025-381087.0In the Linux kernel, the following vulnerability has been resolved: net_sched: red: fix a race in __red_change() Gerrard Tai reported a ra
CVE-2025-38097: Medium severity, CVSS 5.5 | Vulnix