{"id":"CVE-2026-45918","state":"PUBLISHED","title":"ovpn: tcp - don't deref NULL sk_socket member after tcp_close()","description":"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.","publishedAt":"2026-05-27T12:17:34.500Z","updatedAt":"2026-05-27T12:17:34.500Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"11851cbd60ea1e5abbd97619d69845ead99303d6","status":"affected","lessThan":"f998b2c4bec487063a586695159f9a1856e81c56","versionType":"git"},{"version":"11851cbd60ea1e5abbd97619d69845ead99303d6","status":"affected","lessThan":"b9142cf4e066c825ec68752a7dcaceda700bbe26","versionType":"git"},{"version":"11851cbd60ea1e5abbd97619d69845ead99303d6","status":"affected","lessThan":"94560267d6c41b1ff3fafbab726e3f8a55a6af34","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ovpn/tcp.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.16","versionType":"semver"},{"version":"6.18.14","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"6.19.4","status":"unaffected","lessThanOrEqual":"6.19.*","versionType":"semver"},{"version":"7.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ovpn/tcp.c"]}],"references":["https://git.kernel.org/stable/c/f998b2c4bec487063a586695159f9a1856e81c56","https://git.kernel.org/stable/c/b9142cf4e066c825ec68752a7dcaceda700bbe26","https://git.kernel.org/stable/c/94560267d6c41b1ff3fafbab726e3f8a55a6af34"],"weaknesses":[],"ingestedAt":"2026-10-29T20:12:07.131Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/45xxx/CVE-2026-45918.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-45918","state":"PUBLISHED","datePublished":"2026-05-27T12:17:34.500Z","dateUpdated":"2026-05-27T12:17:34.500Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-05-13T15:03:33.085Z"},"containers":{"cna":{"title":"ovpn: tcp - don't deref NULL sk_socket member after tcp_close()","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"11851cbd60ea1e5abbd97619d69845ead99303d6","status":"affected","lessThan":"f998b2c4bec487063a586695159f9a1856e81c56","versionType":"git"},{"version":"11851cbd60ea1e5abbd97619d69845ead99303d6","status":"affected","lessThan":"b9142cf4e066c825ec68752a7dcaceda700bbe26","versionType":"git"},{"version":"11851cbd60ea1e5abbd97619d69845ead99303d6","status":"affected","lessThan":"94560267d6c41b1ff3fafbab726e3f8a55a6af34","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ovpn/tcp.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.16","versionType":"semver"},{"version":"6.18.14","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"6.19.4","status":"unaffected","lessThanOrEqual":"6.19.*","versionType":"semver"},{"version":"7.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ovpn/tcp.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/f998b2c4bec487063a586695159f9a1856e81c56"},{"url":"https://git.kernel.org/stable/c/b9142cf4e066c825ec68752a7dcaceda700bbe26"},{"url":"https://git.kernel.org/stable/c/94560267d6c41b1ff3fafbab726e3f8a55a6af34"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-27T12:17:34.500Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.16","versionEndExcluding":"6.18.14"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.16","versionEndExcluding":"6.19.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.16","versionEndExcluding":"7.0"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}