From patchwork Mon Nov 23 10:37:36 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 5766 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:6022:91c9:10b0:11b:d6c:f273 with SMTP id tl9-n1csp2545095lad; Mon, 23 Nov 2026 02:37:53 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErFWPQLyeC2OdBP0ko2Sf8V/eFnNLhPm2A27ifuV2kxpFKdirzysIdxSWTuk70sbrX6cWrkh0aHdf/A=@openvpn.net X-Received: by 2002:a05:693c:8813:10b0:385:cbc5:7eeb with SMTP id 5a478bee46e88-385cbc595acmr9679218eec.15.1795430273205; Mon, 23 Nov 2026 02:37:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1795430273; cv=none; d=google.com; s=arc-20260327; b=c1P8YPtmogCKbr99xODaqaePAgJTrKn2DAMTNQKFtUtgKubzb5uy15m8+hCujKWm+h nxbHDrV2B5gx21PeDmW7ZuYutvgFGxeKgEEg/qHQbgl0hVNs5Da2DVX7GFQrnMKj1agL n/RJGO0FiC1Wk9wt2TWU8yTo+BnbekMdmyg0FvuYCsRiRfcuDmdyZR6KP+g0gwuGJn5h 8qNCR6XDfqr0obII0lmf6oxb82oDdQDrVlTtI0PrdLAeOzN02BxI+T5/63Blm2PSTxdn 8RzUl9/orR9xGV+mooGYoInEDaoWLDsSwczkODM/0+j0kGbeOcMtonsPklDeYwc2YkpZ wkiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=AW8vtoedYbpTZn6mvqKzPtFo3cMhVbE02wFMqZUvaJM=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=L+Ekm2HkkP4/iB0PW22Em/nbkoT6UsqQhDKLMpPtIzjhZL8hhZNcoQJm+xEkK96ngF KFCQ2WL3zv2ApziIy/jFsWRHW+J+Yo2aTq30s2xS+RQjb3n69K/UOyvYKC/YrZlm44xL dTL+X+BZi3bFNVFzOZSZ6bBWRhPITqqVXvEeDVmedWnmTS+nHrGHIXubptvIzzJMB0KJ oKtqQvot4XtL+aIvXyQEcKntUHaEiDQEhXzpJ/MCRtuNgzbI0kaspdRceQFj9fajg5Jv uMbO65D50msmRkBPZMZJun78SKDtYurUL3UCjr5w362hm6Cx39DMTzmRMD4hAFnkTjST VwOg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=GNusMoGZ; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=kl5BOb1h; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=V+Or3Y2y; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 5a478bee46e88-38566ad8b67si42726365eec.17.2026.11.23.02.37.52 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Nov 2026 02:37:53 -0800 (PST) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=GNusMoGZ; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=kl5BOb1h; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=V+Or3Y2y; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=AW8vtoedYbpTZn6mvqKzPtFo3cMhVbE02wFMqZUvaJM=; b=GNusMoGZ6IIfTO xfpOSl22wybDOkjTQyMwVRlu7v2ECqHbsQ+p5VoFIpnksLeJP6BVDf3j+3/V9B96B39txXBbifTT8 dWJrcWg5l+jVJNoN78gTce4feoNfc+tGYaEU+NqZackNJaZHUDCZo+QIUI2zq32yVM6YZ0dnDOgtP +Dw=; Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.100.1) (envelope-from ) id 1xVRQm-000000004kN-0QeM; Mon, 23 Nov 2026 10:37:52 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.100.1) (envelope-from ) id 1xVRQl-000000004kH-1phC for openvpn-devel@lists.sourceforge.net; Mon, 23 Nov 2026 10:37:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Unsubscribe-Post:List-Subscribe:List-Post:List-Owner:List-Archive; bh=02XOvjzbtlgXNvGc3BCVt/ZB1BKzN5Gs8804UgpWiHI=; b=kl5BOb1hTEIeyxKcXRnnl53dxP FRiuh0LlPSqRJkKW9xpFVnnNMZubovdE4RiaqHVNdwIvHCbnrI0YRvZl5Jbu5fuSJHVU1wyTbsW8H YMvft1EjqDFWlrI7KvWpKjMhVHM5xFc3otcgx0yDHJh2AJ0hyYbOPaZflCiAFbdqHAzU=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=02XOvjzbtlgXNvGc3BCVt/ZB1BKzN5Gs8804UgpWiHI=; b=V+Or3Y2y63r86xdFWm8r/hhrpD S5wkkHg3yvQazdx58lkY2IrCJN0hknE3xevMKc6VkBLKHi3H0rAf+0gwfvCdRMd+2X0sAIpReqdAF qTHxDrfmBqay3M3sQVJTEz8z+9h8+CDMye93icYbNYDbWnVdhUBtvNwEzApWBFR+QXhM=; Received: from [193.149.48.129] (helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.100.1) id 1xVRQj-000000004EX-2JWc for openvpn-devel@lists.sourceforge.net; Mon, 23 Nov 2026 10:37:51 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 6ANAbgCQ010604 for ; Mon, 23 Nov 2026 11:37:42 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 6ANAbgvJ010603 for openvpn-devel@lists.sourceforge.net; Mon, 23 Nov 2026 11:37:42 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Mon, 23 Nov 2026 11:37:36 +0100 Message-ID: <20261123103742.10589-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.55.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-2.hosts.colo.sdot.me", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Razvan Cojocaru The existing-session branch already rejects a packet whose source doesn't match ks->remote_addr, and key_state_soft_reset() keeps that address, so the later check never fails. new_link is always false [...] Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1xVRQj-000000004EX-2JWc Subject: [Openvpn-devel] [PATCH v1] ssl: drop duplicate remote address check in tls_pre_decrypt() X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: 1882645094355535871 X-GMAIL-MSGID: 1882645094355535871 From: Razvan Cojocaru The existing-session branch already rejects a packet whose source doesn't match ks->remote_addr, and key_state_soft_reset() keeps that address, so the later check never fails. new_link is always false in that branch. Change-Id: I74eca236465190ab55db289b98e432757c61a4a3 Signed-off-by: Razvan Cojocaru Acked-by: Lev Stipakov Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2240 --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2240 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Lev Stipakov diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c index d5ae13d..e4a39b2 100644 --- a/src/openvpn/ssl.c +++ b/src/openvpn/ssl.c @@ -4003,7 +4003,7 @@ /* * Verify remote IP address */ - if (!new_link && !link_socket_actual_match(&ks->remote_addr, from)) + if (!link_socket_actual_match(&ks->remote_addr, from)) { msg(D_TLS_ERRORS, "TLS Error: Received control packet from unexpected IP addr: %s", print_link_socket_actual(from, &gc)); @@ -4105,13 +4105,6 @@ ks->remote_addr = *from; ++multi->n_sessions; } - else if (!link_socket_actual_match(&ks->remote_addr, from)) - { - msg(D_TLS_ERRORS, - "TLS Error: Existing session control channel packet from unknown IP address: %s", - print_link_socket_actual(from, &gc)); - goto error; - } /* * Should we do a retransmit of all unacknowledged packets in