Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C7D13F076D for ; Wed, 27 May 2026 12:25:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779884709; cv=none; b=IbftBjsndT2R8bZxWf9EAxKCt0EL7K/7dNE/EBAgzhdY0kk1v/nzvpGA0/F3DlfMdyLb3pE8S5RdKTvSYAQu0AFg3qrwTjXrbVF5b6HxmePyNs1HSmgFvjxHv0g92X+dTTzrYC3AluNqot5KRfZWoJHLgnx6ZOyNcjbYx1kr8W0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779884709; c=relaxed/simple; bh=UEMMPcBzE5gFkxfKiA4TIDCCC51gPbUFapv2Pcs6nys=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Hvdwr6LhLshjLw8ZQoleecL2q7Xksx+J6wvmHkUZlpPq4KfvZaN6Bhwtd/RDAmRgI7VA7EM3b154YRJF7nn7meR4Xwvdv/0wQmgK+ddp+OltPlz/mK+adO8t1KcCn/UDMYCDHztfgpwzYz4/3oSY/1qVgGM+3ftLcHZG8GVARtk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=zchdOjfI; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="zchdOjfI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F06AD1F000E9; Wed, 27 May 2026 12:25:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779884708; bh=gtk9+KraHdGu/LSIZ0RAPsxEs3CSb7matFgbPLY/Flg=; h=From:To:Cc:Subject:Date:Reply-To; b=zchdOjfI1GMdUzyDbqj5bXKz/9++vf3moQwHd6MG4OOF7lYWrJMo9/qEVuvnnHhy9 GbAW5zFCHWMccUW6vLiBkCR3nezCtGgJRGNnpwbGxIGpScAeaUK2E478PPX7zjGp/l xLIXvthZEi4eK/qSmRlcrBiyr4KLvvPe/u9nmIyc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-45918: ovpn: tcp - don't deref NULL sk_socket member after tcp_close() Date: Wed, 27 May 2026 14:19:20 +0200 Message-ID: <2026052724-CVE-2026-45918-701d@gregkh> X-Mailer: git-send-email 2.54.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3024; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=lUBO6k5nhOrHIedh3sSLzTeyRJL8VPTKpOZLZoAU8zc=; b=owGbwMvMwCRo6H6F97bub03G02pJDFliDwW271/kunxTEHuUiX1ziGF95HLzjpOik3yV7/s1e Rb8Os7XEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABOJ28AwP7nu9BMvj/nbympE jgq4TBL0vrPHkGHB/Ld9DsWOabuPz1yl8O3Iu4Ma+xZmAAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: ovpn: tcp - don't deref NULL sk_socket member after tcp_close() When deleting a peer in case of keepalive expiration, the peer is removed from the OpenVPN hashtable and is temporary inserted in a "release list" for further processing. This happens in: ovpn_peer_keepalive_work() unlock_ovpn(release_list) This processing includes detaching from the socket being used to talk to this peer, by restoring its original proto and socket ops/callbacks. In case of TCP it may happen that, while the peer is sitting in the release list, userspace decides to close the socket. This will result in a concurrent execution of: tcp_close(sk) __tcp_close(sk) sock_orphan(sk) sk_set_socket(sk, NULL) The last function call will set sk->sk_socket to NULL. When the releasing routine is resumed, ovpn_tcp_socket_detach() will attempt to dereference sk->sk_socket to restore its original ops member. This operation will crash due to sk->sk_socket being NULL. Fix this race condition by testing-and-accessing sk->sk_socket atomically under sk->sk_callback_lock. The Linux kernel CVE team has assigned CVE-2026-45918 to this issue. Affected and fixed versions =========================== Issue introduced in 6.16 with commit 11851cbd60ea1e5abbd97619d69845ead99303d6 and fixed in 6.18.14 with commit f998b2c4bec487063a586695159f9a1856e81c56 Issue introduced in 6.16 with commit 11851cbd60ea1e5abbd97619d69845ead99303d6 and fixed in 6.19.4 with commit b9142cf4e066c825ec68752a7dcaceda700bbe26 Issue introduced in 6.16 with commit 11851cbd60ea1e5abbd97619d69845ead99303d6 and fixed in 7.0 with commit 94560267d6c41b1ff3fafbab726e3f8a55a6af34 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-45918 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/net/ovpn/tcp.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/f998b2c4bec487063a586695159f9a1856e81c56 https://git.kernel.org/stable/c/b9142cf4e066c825ec68752a7dcaceda700bbe26 https://git.kernel.org/stable/c/94560267d6c41b1ff3fafbab726e3f8a55a6af34