CVE-2026-64045
ovpn: tcp - use cached peer pointer in ovpn_tcp_close()
Description
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.
INFO
Published Date :
July 19, 2026, 4:17 p.m.
Last Modified :
Oct. 24, 2026, 8:10 p.m.
Remotely Exploit :
No
Source :
416baaa9-dc9f-4396-8d5f-8c081fb06d67
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS 3.1 | HIGH | 416baaa9-dc9f-4396-8d5f-8c081fb06d67 |
Solution
- Apply the kernel patch for the ovpn: tcp issue.
- Update the Linux kernel to the latest stable version.
- Rebuild and redeploy affected kernel modules.
- Verify the fix by testing.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-64045.
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-64045 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-64045
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-64045 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-64045 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Translated by [email protected]
Oct. 24, 2026
Action Type Old Value New Value Added Translation Title: ovpn: tcp - use cached peer pointer in ovpn_tcp_close(), Description: En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: ovpn: tcp - usar puntero de par en caché en ovpn_tcp_close() ovpn_tcp_close() carga el ovpn_socket a través de rcu_dereference_sk_user_data() bajo rcu_read_lock(), toma una referencia en sock -> peer, almacena en caché el puntero del par en una variable local, y libera el bloqueo de lectura. Luego pasa sock -> peer (en lugar de la variable local en caché) a ovpn_peer_del(), volviendo a desreferenciar el ovpn_socket después de que la sección de lectura RCU haya terminado. A diferencia de ovpn_tcp_sendmsg(), que utiliza el mismo patrón de ’cargar bajo RCU, usar después de desbloquear’ pero está protegido por lock_sock() mantenido durante toda la función, ovpn_tcp_close() se ejecuta sin el bloqueo del socket: inet_release() invoca sk_prot -> close() sin tomar lock_sock primero. Por lo tanto, ovpn_socket_release() puede completar su secuencia kref_put -> detach -> synchronize_rcu -> kfree(sock) concurrentemente, en la ventana después de que ovpn_tcp_close() libera rcu_read_lock() pero antes de que desreferencie sock -> peer. El synchronize_rcu() en ovpn_socket_release() protege a los lectores que usan el puntero desreferenciado dentro de la sección de lectura RCU, no a aquellos que escapan el puntero a una variable local y lo usan después. Un reproductor sigue el patrón del commit 94560267d6c4 (’ovpn: tcp - no desreferenciar miembro sk_socket NULL después de tcp_close()’): activar una eliminación de par (expiración de keepalive o netlink OVPN_CMD_DEL_PEER) en el mismo momento en que el espacio de usuario cierra el descriptor de archivo TCP. Ese commit corrigió el lado de desvinculación de la misma ventana de carrera; este corrige el lado de cierre en una víctima diferente. Ajustar el bloque de entrada para leer sock -> peer exactamente una vez en la variable local del par en caché, y enrutar todos los usos subsiguientes (la verificación de retención, la llamada a ovpn_peer_del() y la invocación de prot -> close()) a través de esa variable local. sock -> peer solo se escribe una vez en ovpn_socket_new() bajo lock_sock(), antes de que rcu_assign_sk_user_data() publique el ovpn_socket, y nunca se reasigna después, pero el patrón de múltiples lecturas anterior hizo que ese invariante fuera implícito en lugar de explícito. La misma forma de múltiples lecturas existe en ovpn_tcp_recvmsg(), ovpn_tcp_sendmsg(), ovpn_tcp_data_ready() y ovpn_tcp_write_space(); estos se limpiarán mediante una función auxiliar dedicada en una serie net-next de seguimiento. -
Initial Analysis by [email protected]
Sep. 02, 2026
Action Type Old Value New Value Added CWE CWE-476 Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:7.1:rc1:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.1:rc2:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.1:rc3:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.1:rc4:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.19 up to (excluding) 7.0.11 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.16 up to (excluding) 6.18.34 Added Reference Type kernel.org: https://git.kernel.org/stable/c/775d8d7ad02aa345e1588424a6a8b9ae49fb9012 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/d3ef441907fca7c340979e577a3db3bb634bf166 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/e5460eb7238c19d651a9b22b2378b587033a4095 Types: Patch -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Jul. 20, 2026
Action Type Old Value New Value Added CVSS V3.1 AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H -
New CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Jul. 19, 2026
Action Type Old Value New Value Added Affected [{'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '11851cbd60ea1e5abbd97619d69845ead99303d6', 'lessThan': 'e5460eb7238c19d651a9b22b2378b587033a4095', 'versionType': 'git'}, {'status': 'affected', 'version': '11851cbd60ea1e5abbd97619d69845ead99303d6', 'lessThan': 'd3ef441907fca7c340979e577a3db3bb634bf166', 'versionType': 'git'}, {'status': 'affected', 'version': '11851cbd60ea1e5abbd97619d69845ead99303d6', 'lessThan': '775d8d7ad02aa345e1588424a6a8b9ae49fb9012', 'versionType': 'git'}], 'programFiles': ['drivers/net/ovpn/tcp.c'], 'defaultStatus': 'unaffected'}, {'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '6.16'}, {'status': 'unaffected', 'version': '0', 'lessThan': '6.16', 'versionType': 'semver'}, {'status': 'unaffected', 'version': '6.18.34', 'versionType': 'semver', 'lessThanOrEqual': '6.18.*'}, {'status': 'unaffected', 'version': '7.0.11', 'versionType': 'semver', 'lessThanOrEqual': '7.0.*'}, {'status': 'unaffected', 'version': '7.1', 'versionType': 'original_commit_for_fix', 'lessThanOrEqual': '*'}], 'programFiles': ['drivers/net/ovpn/tcp.c'], 'defaultStatus': 'affected'}] Added Description 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. Added Reference https://git.kernel.org/stable/c/775d8d7ad02aa345e1588424a6a8b9ae49fb9012 Added Reference https://git.kernel.org/stable/c/d3ef441907fca7c340979e577a3db3bb634bf166 Added Reference https://git.kernel.org/stable/c/e5460eb7238c19d651a9b22b2378b587033a4095