CVE-2026-64045: ovpn: tcp - use cached peer pointer in ovpn_tcp_close()
In the Linux kernel, the following vulnerability has been resolved:
ovpn: tcp - use cached peer pointer in ovpn_tcp_close()
ovpn_tcp_close() loads the ovpn_socket via rcu_dereference_sk_user_data()
under rcu_read_lock(), takes a reference on sock->peer, caches the peer
pointer in a local, and drops the read lock. It then passes sock->peer
(rather than the cached local) to ovpn_peer_del(), re-dereferencing the
ovpn_socket after the RCU read section has ended.
Unlike ovpn_tcp_sendmsg(), which uses the same "load under RCU, use
after unlock" pattern but is protected by lock_sock() held across the
function, ovpn_tcp_close() runs without the socket lock: inet_release()
invokes sk_prot->close() without taking lock_sock first.
ovpn_socket_release() can therefore complete its kref_put -> detach ->
synchronize_rcu -> kfree(sock) sequence concurrently, in the window
after ovpn_tcp_close() drops rcu_read_lock() but before it dereferences
sock->peer. The synchronize_rcu() in ovpn_socket_release() protects
readers that use the dereferenced pointer inside the RCU read section,
not those that escape the pointer to a local and use it afterwards.
A reproducer follows the pattern of commit 94560267d6c4 ("ovpn: tcp -
don't deref NULL sk_socket member after tcp_close()"): trigger a peer
removal (keepalive expiration or netlink OVPN_CMD_DEL_PEER) at the same
moment userspace closes the TCP fd. That commit fixed the detach-side
of the same race window; this one fixes the close-side at a different
victim.
Tighten the entry block to read sock->peer exactly once into the cached
peer local, and route all subsequent uses (the hold check, the
ovpn_peer_del() call, and the prot->close() invocation) through that
local. sock->peer is only ever written once in ovpn_socket_new() under
lock_sock(), before rcu_assign_sk_user_data() publishes the ovpn_socket,
and is never reassigned afterwards - but the previous multi-read pattern
made that invariant implicit rather than explicit. The same multi-read
shape exists in ovpn_tcp_recvmsg(), ovpn_tcp_sendmsg(),
ovpn_tcp_data_ready() and ovpn_tcp_write_space(); those will be cleaned
up via a dedicated helper in a follow-up net-next series.
Security readout for executives and security teams
Plain-English summary
CVE-2026-64045 is a Linux kernel flaw in ovpn TCP cleanup. A timing race can leave the kernel using freed memory when an OpenVPN peer is removed while a TCP connection closes. The score is high because successful local exploitation could affect confidentiality, integrity, and availability. The provided sources do not show active exploitation.
Executive priority
Treat this as high-priority kernel maintenance for systems using ovpn TCP. It is not presented as internet-remote or actively exploited in the supplied evidence, but kernel memory-safety impact across confidentiality, integrity, and availability warrants timely patch planning.
Technical view
ovpn_tcp_close() cached an ovpn_socket under RCU, dropped the RCU read lock, then re-read sock->peer instead of using the held local peer pointer. ovpn_socket_release() could concurrently detach, synchronize_rcu(), and free the socket, causing a use-after-free race. Stable fixes route later close-side uses through the cached peer pointer.
Likely exposure
Systems running affected Linux kernels with ovpn TCP support and active OpenVPN peer handling are the likely exposure. The bundle names Linux as affected but does not provide distribution package names or complete downstream version mapping.
Exploitation context
The CVE source describes a reproducer pattern involving simultaneous peer removal and userspace TCP file descriptor close. KEV is false, and the provided sources include no claim of public exploitation or weaponized exploit availability.
Researcher notes
The issue is a close-side RCU lifetime bug in ovpn_tcp_close(). The vulnerable pattern is re-dereferencing sock->peer after leaving the RCU read-side section while release can free the ovpn_socket. The fix makes the cached peer pointer explicit across hold, delete, and close paths.
Mitigation direction
Apply the relevant Linux stable kernel update containing the referenced ovpn TCP fix.
Check distribution advisories for backported kernel package names and release status.
Prioritize hosts using kernel ovpn TCP functionality or OpenVPN peer management.
If patch timing is delayed, review vendor guidance for supported temporary mitigations.
Validation and detection
Inventory Linux kernel versions and compare them with vendor fixed releases.
Confirm whether affected systems use ovpn TCP functionality or OpenVPN peer handling.
Verify the referenced stable fix is present in deployed kernel source or package changelogs.
Monitor vendor advisories for corrected affected-version mapping and downstream package status.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2026-64045 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
0ADP providers
4Source links
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.