{"id":"CVE-2026-45918","aliases":["CVE-2026-45918"],"related":[],"kind":"vulnerability","state":"published","title":"ovpn: tcp - don't deref NULL sk_socket member after tcp_close()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\novpn: tcp - don't deref NULL sk_socket member after tcp_close()\n\nWhen deleting a peer in case of keepalive expiration, the peer is\nremoved from the OpenVPN hashtable and is temporary inserted in a\n\"release list\" for further processing.\n\nThis happens in:\novpn_peer_keepalive_work()\n  unlock_ovpn(release_list)\n\nThis processing includes detaching from the socket being used to\ntalk to this peer, by restoring its original proto and socket\nops/callbacks.\n\nIn case of TCP it may happen that, while the peer is sitting in\nthe release list, userspace decides to close the socket.\nThis will result in a concurrent execution of:\n\ntcp_close(sk)\n  __tcp_close(sk)\n    sock_orphan(sk)\n      sk_set_socket(sk, NULL)\n\nThe last function call will set sk->sk_socket to NULL.\n\nWhen the releasing routine is resumed, ovpn_tcp_socket_detach()\nwill attempt to dereference sk->sk_socket to restore its original\nops member. This operation will crash due to sk->sk_socket being NULL.\n\nFix this race condition by testing-and-accessing\nsk->sk_socket atomically under sk->sk_callback_lock.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\novpn: tcp - don't deref NULL sk_socket member after tcp_close()\n\nWhen deleting a peer in case of keepalive expiration, the peer is\nremoved from the OpenVPN hashtable and is temporary inserted in a\n\"release list\" for further processing.\n\nThis happens in:\novpn_peer_keepalive_work()\n  unlock_ovpn(release_list)\n\nThis processing includes detaching from the socket being used to\ntalk to this peer, by restoring its original proto and socket\nops/callbacks.\n\nIn case of TCP it may happen that, while the peer is sitting in\nthe release list, userspace decides to close the socket.\nThis will result in a concurrent execution of:\n\ntcp_close(sk)\n  __tcp_close(sk)\n    sock_orphan(sk)\n      sk_set_socket(sk, NULL)\n\nThe last function call will set sk->sk_socket to NULL.\n\nWhen the releasing routine is resumed, ovpn_tcp_socket_detach()\nwill attempt to dereference sk->sk_socket to restore its original\nops member. This operation will crash due to sk->sk_socket being NULL.\n\nFix this race condition by testing-and-accessing\nsk->sk_socket atomically under sk->sk_callback_lock.","source":"cvelist"}],"published":"2026-05-27T12:17:34.500Z","modified":"2026-06-24T17:22:46.393Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-476"],"affected":[{"ranges":[{"type":"git","introduced":"11851cbd60ea1e5abbd97619d69845ead99303d6","fixed":"f998b2c4bec487063a586695159f9a1856e81c56","status":"affected"},{"type":"git","introduced":"11851cbd60ea1e5abbd97619d69845ead99303d6","fixed":"b9142cf4e066c825ec68752a7dcaceda700bbe26","status":"affected"},{"type":"git","introduced":"11851cbd60ea1e5abbd97619d69845ead99303d6","fixed":"94560267d6c41b1ff3fafbab726e3f8a55a6af34","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.16","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.16","status":"unaffected"},{"type":"semver","introduced":"6.18.14","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"6.19.4","lastAffected":"6.19.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.0","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.16","fixed":"6.18.14"},{"status":"affected","introduced":"6.19","fixed":"6.19.4"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/f998b2c4bec487063a586695159f9a1856e81c56","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b9142cf4e066c825ec68752a7dcaceda700bbe26","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/94560267d6c41b1ff3fafbab726e3f8a55a6af34","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-45918","url":"https://www.cve.org/CVERecord?id=CVE-2026-45918","licence":"CVE Terms of Use","modified":"2026-05-27T12:17:34.500Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-45918","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45918","licence":"Public domain","modified":"2026-06-24T17:22:46.393Z"}],"updatedAt":"2026-11-25T22:59:22.504Z","epss":{"score":0.00163,"percentile":0.05758,"date":"2026-12-01T12:00:22.000Z"}}