Local kernel memory corruption via cached socket reference
Published Jul 3, 2025 · Updated Aug 5, 2026
Use-after-free in Linux kernel espintcp allows local users to read or corrupt kernel memory through a stale cached socket reference. The xfrm_state cache retains encap_sk after __xfrm_state_delete() drops its socket reference, so deferred esp_find_tcp_sk() handling dereferences a released socket and can issue a second sock_put(). A local user can reach the path through a user namespace; exploitation can disclose or corrupt kernel memory, exhaust memory by pinning network namespaces, or crash the system.
Summary
What happened
Use-after-free in Linux kernel espintcp allows local users to read or corrupt kernel memory through a stale cached socket reference. The xfrm_state cache retains encap_sk after __xfrm_state_delete() drops its socket reference, so deferred esp_find_tcp_sk() handling dereferences a released socket and can issue a second sock_put(). A local user can reach the path through a user namespace; exploitation can disclose or corrupt kernel memory, exhaust memory by pinning network namespaces, or crash the system.
The record
- CVE
- CVE-2025-38097
- Published
- Jul 3, 2025
- Updated
- Aug 5, 2026
- Vendor
- The Linux Kernel Organization
- Product
- Linux
- Classifications
- T1068
- Attack vector
- local
- Privileges
- authenticated
Timeline
How it unfolded
- Jul 3, 2025CVE publishedPublication date reported by the CVE source.
- Aug 5, 2026Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=5.6
- Affected versionversion=e27cca96cd68fa2c6814c90f9a1cfd36bb68c593 <028363685bd0b7a19b4a820f82dd905b1dc83999
- Affected versionversion=e27cca96cd68fa2c6814c90f9a1cfd36bb68c593 <74fd327767fb784c5875cf7c4ba1217f26020943
- Affected versionversion=e27cca96cd68fa2c6814c90f9a1cfd36bb68c593 <9cbca30102028f9ad3d2098f935c4368f581fd07
- Affected versionversion=e27cca96cd68fa2c6814c90f9a1cfd36bb68c593 <b58a295d10065960bcb9d60cb8ca6ead9837cd27
- Affected versionversion=e27cca96cd68fa2c6814c90f9a1cfd36bb68c593 <e4cde54b46a87231c77256a633be1bef62687d69
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
No public exploit references are available in this record.
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo