From patchwork Sun Sep 10 15:33:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "plaisthos (Code Review)" X-Patchwork-Id: 3339 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:390:b0:d7:3b0f:3938 with SMTP id 16csp1773293dyq; Sun, 10 Sep 2023 08:33:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG+tfDfO3uhQVGDlEwgb2wrMHvx0rQtnaUpJU7/kI4qV5UV16TMUS1tIlf2ALGFojLDnPlZ X-Received: by 2002:a17:902:e54b:b0:1bb:d7d4:e2b with SMTP id n11-20020a170902e54b00b001bbd7d40e2bmr9059864plf.0.1694360037571; Sun, 10 Sep 2023 08:33:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694360037; cv=none; d=google.com; s=arc-20160816; b=TsrcowlSIgeODiNm2AXOIqRvBF4RTkys+M1Id+Lp2NXOxUgRKCBg4PqI0AQBFeirqZ 7iW/MA1lftbc2Iph5ReTZTK0P5IlGj64NBBBhhObbIRbilniZrSbgZb0mdaVSiGaRVHH cxz4WQLrTgbeb1nre+ozR0fJj79YDG+ezqS+cE/4DKWV6eXF7xCvGg2HmrcyD089aBJO 7KkDnKA49XK774/LGAs0OAcoNVARN1SRNYx8M6nU7U/9P9h8jfU0BwsqbOP3a49pxQ4o fq/jkpIHwHUKulqPYvXBCxQsrINpA1VY8x+cPETlVjAyMjKSiBlleNCkiqk9K7P5o066 PA8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:cc:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:user-agent :mime-version:message-id:references:in-reply-to:auto-submitted:to :date:from:dkim-signature:dkim-signature:dkim-signature; bh=+lE2xWC/dMg88cWT/Z8XP7oRgKFGwBCAG5Q6aHF5jvA=; fh=lm0MLPW7DntlrDqRECIiC9JlE1uPxhepE0URYHIf+eE=; b=jCvScRuWY3cd0t+p9CXv4igHdBhrVqy5lQ8C8EP4yKPfJwvoh1cdT+5ipHbgpETA0q ypLqedhrCUYyWt7Zue7rMCcFvXjtJop/gvmJ46WLNQaFuzqtY19wjxQBBoXbkXv0zg1l hqD8a19v50zHbnE01iXNt24sugIeg1hDFQby/WVCCXTMeN100jPTlTeNWbFkHh9a6UoY cw8ZFZ4YYdZz8/+x1ZySE8buhB0p0+n3i8qhWnQ26gL8YyeFleaUgYzOaXQzyh/A41pi iKFgWL58Mrudjw6N5mr0pNv2nl421iWQuWhD3B1u3fOC5NnnfG61vsf2uCCpd3e9nOUw C8pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=KhWYrZC+; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=k+kvuVvx; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=eiXY2OiB; 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=openvpn.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id f4-20020a170902ce8400b001bb00cc105csi5013753plg.632.2023.09.10.08.33.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Sep 2023 08:33:57 -0700 (PDT) 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=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=KhWYrZC+; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=k+kvuVvx; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=eiXY2OiB; 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=openvpn.net 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.95) (envelope-from ) id 1qfMRO-00033O-F0; Sun, 10 Sep 2023 15:33:39 +0000 Received: from [172.30.20.202] (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.95) (envelope-from ) id 1qfMRN-00033I-5u for openvpn-devel@lists.sourceforge.net; Sun, 10 Sep 2023 15:33:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Content-Transfer-Encoding:MIME-Version :Message-ID:Reply-To:References:In-Reply-To:Subject:List-Unsubscribe:List-Id: Cc:To:Date:From:Sender:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Help:List-Subscribe :List-Post:List-Owner:List-Archive; bh=QBxXZr0A9Ua0LQS7DKwCHJKUZPzWaG/R1iJF1KRfv/I=; b=KhWYrZC+y3tDjfF6pLLpaWUmxa mihFRy0eqaifZqvI/XkrOLGOdsTzI12glskSOgOtFuRaEnJPKFzIqqZwKCDuBYAuBpHCZpvkRxObI f6HjhUp0yIQX4xCkW/A/yKgQeExh5QD1n3rsUGnXOetdUi2FA1D8I9Zjc9qYWAq668WI=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Reply-To: References:In-Reply-To:Subject:List-Unsubscribe:List-Id:Cc:To:Date:From: Sender:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Help:List-Subscribe:List-Post: List-Owner:List-Archive; bh=QBxXZr0A9Ua0LQS7DKwCHJKUZPzWaG/R1iJF1KRfv/I=; b=k +kvuVvx3twidUmf+Twvxm8GaKmGoOg+Czvw4bM/nvZ0roLBuFFav1T3X9DU7cOnyhZA4b/ZW98cmw ayvB55kQYOztSRwfb1caFeXVXzdn+2HfZx0TKssZhtWbVbLkxZoClujaCPbjGdKxM/8z478WsMZXK IL7G1FkVzHLJwXW0=; Received: from mail-wm1-f47.google.com ([209.85.128.47]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1qfMRH-0005bX-ES for openvpn-devel@lists.sourceforge.net; Sun, 10 Sep 2023 15:33:38 +0000 Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-401f68602a8so39743755e9.3 for ; Sun, 10 Sep 2023 08:33:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvpn.net; s=google; t=1694360005; x=1694964805; darn=lists.sourceforge.net; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:in-reply-to:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from:from:to:cc :subject:date:message-id:reply-to; bh=QBxXZr0A9Ua0LQS7DKwCHJKUZPzWaG/R1iJF1KRfv/I=; b=eiXY2OiBFS/dlHYhHf5pcZbDtjvFk8FB7Mzse6IedYR2XnX8bLFWN3PptWhZxfl99W U3Ef8T52jQBxCbrOHfyF9H0Z1O3ga+EI/izwDLAx8+EPYc8vO5h89lylkQeiyBq15YjD vC81wb4+NntkC6XvONLyDH4O28GsWjmsEs48XoG8sgjOMcI10DA++FSIwYx7vlWto+CB vVX9PFZwLhTnaxzN2SQ1UueOehvW50MqkR1qr59skPeAoIlSSEQ2sDcnkEoDknO0rFbA 3tb9h7tnY8NUFQsEcgF/sjbqZMdfk3fP0hFd6jVygM3UW81VYg1k9hZrEcyz4QvYTonx 5kSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694360005; x=1694964805; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:in-reply-to:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QBxXZr0A9Ua0LQS7DKwCHJKUZPzWaG/R1iJF1KRfv/I=; b=cGdenJLas273qXRlcyukzV9+4bDrkwe4z1zmlt/OyNd0Yqb0hAewGT4pyFI6Rz4vmm hHJiRSyG+I5ZsTPclbL/ByDmEDW0juFxOT5dBvhkTFe+Gx+p5p0jSjfPwE8PsbWcuz5H wAUBM49XXBixjdSpLqeYp8jSvOYpifQEOb7kl4xhL7TnF0CpEadVKM8JHMyTFtsfeoIk Q5yvc7XKeY6otqiFuuH0ekCQMTOqfrpGS9l8EJ7PR8ICwL4NlZRxILH7nUozsoJ3WPD+ u9u0s6OGaUZa2UMiNb2MbPUPGOhaF465rsOSCQde/ME7puxzKQ5Pl6CugbX78nN7aa5y hMUA== X-Gm-Message-State: AOJu0YyErDd4wwx017Y4BhchXWqAOxJOeZiyLoVYX8459s56NPoMvPGL Wipnr0xXnmxWgwMC1iWppB2w1jLv7fzmrgnCWjs= X-Received: by 2002:a05:600c:5128:b0:402:f501:447c with SMTP id o40-20020a05600c512800b00402f501447cmr6180143wms.0.1694360004720; Sun, 10 Sep 2023 08:33:24 -0700 (PDT) Received: from gerrit.openvpn.in (ec2-18-159-0-78.eu-central-1.compute.amazonaws.com. [18.159.0.78]) by smtp.gmail.com with ESMTPSA id t15-20020a7bc3cf000000b00402be2666bcsm10753776wmj.6.2023.09.10.08.33.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Sep 2023 08:33:24 -0700 (PDT) From: "cron2 (Code Review)" X-Google-Original-From: "cron2 (Code Review)" X-Gerrit-PatchSet: 2 Date: Sun, 10 Sep 2023 15:33:23 +0000 To: flichtenheld Auto-Submitted: auto-generated X-Gerrit-MessageType: newpatchset X-Gerrit-Change-Id: I61adc26ce2ff737e020c3d980902a46758cb23e5 X-Gerrit-Change-Number: 324 X-Gerrit-Project: openvpn X-Gerrit-ChangeURL: X-Gerrit-Commit: 0793eb105c5720c4eb31af71c9db81459439e510 In-Reply-To: References: Message-ID: <63e53945cdd2f8e7ecb27c2ef4227ff04ff697c1-EmailReplacePatchSet-HTML@gerrit.openvpn.net> MIME-Version: 1.0 User-Agent: Gerrit/3.8.0 X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.v13.lw.sourceforge.com", 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: cron2 has uploaded a new patch set (#2) to the change originally created by ordex. ( http://gerrit.openvpn.net/c/openvpn/+/324?usp=email ) Change subject: dco: fix crash when --multihome is used with --proto tcp Content analysis details: (-0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.47 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.47 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 WEIRD_PORT URI: Uses non-standard port number for HTTP 0.0 HTML_MESSAGE BODY: HTML included in message -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 T_KAM_HTML_FONT_INVALID Test for Invalidly Named or Formatted Colors in HTML X-Headers-End: 1qfMRH-0005bX-ES Subject: [Openvpn-devel] [XS] Change in openvpn[master]: dco: fix crash when --multihome is used with --proto tcp 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: , Reply-To: openvpn-devel@lists.sourceforge.net, frank@lichtenheld.com, a@unstable.cc Cc: openvpn-devel Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1774339114730416169?= X-GMAIL-MSGID: =?utf-8?q?1776665270997211747?= cron2 has uploaded a new patch set (#2) to the change originally created by ordex. ( http://gerrit.openvpn.net/c/openvpn/+/324?usp=email ) Change subject: dco: fix crash when --multihome is used with --proto tcp ...................................................................... dco: fix crash when --multihome is used with --proto tcp Although it's a combination of options that is not really useful, when specifying --multihome along with --proto tcp and DCO is enabled, OpenVPN will crash while attempting to access c2.link_socket_actual (NULL for the TCP case) in order to retrieve the local address (in function dco_multi_get_localaddr()) Prevent crash by running this code only if proto is UDP. The same check is already performed in socket.c/h for the non-DCO case. Github: fixes OpenVPN/openvpn#390 Change-Id: I61adc26ce2ff737e020c3d980902a46758cb23e5 Signed-off-by: Antonio Quartulli Acked-by: Gert Doering Message-Id: <20230815231555.6465-1-a@unstable.cc> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26953.html Signed-off-by: Gert Doering --- M src/openvpn/dco.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/24/324/2 diff --git a/src/openvpn/dco.c b/src/openvpn/dco.c index 7c7eaac..cd3e0ad 100644 --- a/src/openvpn/dco.c +++ b/src/openvpn/dco.c @@ -509,7 +509,7 @@ #if ENABLE_IP_PKTINFO struct context *c = &mi->context; - if (!(c->options.sockflags & SF_USE_IP_PKTINFO)) + if (!proto_is_udp(c->c2.link_socket->info.proto) || !(c->options.sockflags & SF_USE_IP_PKTINFO)) { return false; }