From patchwork Sun Sep 10 15:33:25 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: 3340 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:390:b0:d7:3b0f:3938 with SMTP id 16csp1773495dyq; Sun, 10 Sep 2023 08:34:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHQaXwK21f6xpmiof0bP8XvQQYkpliflGITmGnoSn8fYV+PltcX7jXZ54osga9DCuYgqq/+ X-Received: by 2002:a05:6a21:a587:b0:123:3ec2:360d with SMTP id gd7-20020a056a21a58700b001233ec2360dmr11524857pzc.5.1694360066102; Sun, 10 Sep 2023 08:34:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694360066; cv=none; d=google.com; s=arc-20160816; b=XURC1om3mB2kpHRqf6eVf9bBR1BSAm5mD7lmC8pFryq4pxXbgsSVxESufBNXHgwH4j yNqWOFCa6df5L+FCsDUJHgIUV0YjIepjY4WcnOmN6Reg+n0I0iPzKC98s2ZtoDNuMuEm Y8yeM5NteRgLXkc3XmbqCslhVdmyKK8l9WHMUxqP2IFJxk+043YuVkbJYbSE09y+8FtL +8Qy+3+FWVc7HFSYIj+UDhxwJXA5Pr+Awk6+e4nMhCPDpvRz2lV8eZK+q9+I0jzr7Rnr p2sh4RxRUywfWBY5EIGlXEUXNE3S4aryeRpPIxUaxLQGiAGmlBjRoJk1ls58DFS5YxXi 3NQQ== 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:date :from:dkim-signature:dkim-signature:dkim-signature; bh=CQEEf8VvxlJArbiM4zVRO/7Mguvr+udCG9s9wYtrA9w=; fh=smjZBu6iNkWiUqneddhXe9SViGbN07L/0qKvVAHuico=; b=z/02t7vgsFIXIoOXU24eX9NonRfIDQ/uXXyNXgURsH5GpQpV1w2cRomWjplK9jgWJq 1ptaj0EiOwmqh3CV+6fvp6BB8qVAhLLQUxoCetAzOgtiM09bbjzWeM4CHI3FlQKq1b7g 02LzNN2XKy/k5eTH81+sEeSX5F7ztAMnFmE24aalTNTTTUvComzbih0t6kA++qqZ0XyR jKjXTmPz8VXMCmbxyloAiEl1oTxTfjq8FOb4fGjd04OHG6XagiNAk5M4bA5tvtAcBuNG YxsWqXyAMjue30DClO2dAx3Ir0Hjzr23Rz/BHr+CT1duM6tT8RuTlcM2Vq8okneTr6Y/ cXQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=SNVfukrY; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=MyoVIQE2; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=Xqseh0CY; 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 71-20020a63004a000000b00573f7b6999csi4785520pga.440.2023.09.10.08.34.25 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Sep 2023 08:34:26 -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=SNVfukrY; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=MyoVIQE2; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=Xqseh0CY; 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-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1qfMRR-0005Jh-9G; Sun, 10 Sep 2023 15:33:40 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qfMRP-0005JW-Al 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:Date:From:Sender:To: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=8Eoh6jyNrCcyflp6SfdHYh1h5k3qGCJejop5o3ZzBkI=; b=SNVfukrYbNExmoCV0KNRJPjB0t vxHpkT84DJjbDHhaVUP2ebtmUFOBDfvIuKr5uqEfWyzjNgs7cW2ImhCzmgrln3XE+E0kGpnOPvBi6 SqO5CcNAwtgU3ttfd3i+88SEVeiUKpazM6v4HT1ZNqdlvAMGSDI7DYm6yRj/t4/wHLaY=; 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:Date:From:Sender: To: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=8Eoh6jyNrCcyflp6SfdHYh1h5k3qGCJejop5o3ZzBkI=; b=M yoVIQE22Fc0DUsQXJ8/WXt2KUkSo15fRBhnCDPph4GLZW47UuZKPozBfE5UAJ4bHJH57YsQCLnWj/ n5gT6pChRRTm7nF9bh/gEfSssJleEWwoMUg/CFXIIL7ox4essbaaddNE761M6jRV6yTHfLW/MDeA4 UW6yX/OxiG1TJ2QE=; Received: from mail-wm1-f42.google.com ([209.85.128.42]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1qfMRJ-0005bd-Hj for openvpn-devel@lists.sourceforge.net; Sun, 10 Sep 2023 15:33:38 +0000 Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-403012f27e1so14453085e9.1 for ; Sun, 10 Sep 2023 08:33:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvpn.net; s=google; t=1694360007; x=1694964807; 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:date:from:from:to:cc :subject:date:message-id:reply-to; bh=8Eoh6jyNrCcyflp6SfdHYh1h5k3qGCJejop5o3ZzBkI=; b=Xqseh0CYzxIfJXisYI5xOlYxah9cDzj26gSNOTKL8KnjmtUcwhMjhDKGx5ktANGvC0 AsIyn5nrRlzYTbgvBCLvjmA5x+cmXM5c6nJiNpraizs84RkEitkp/jJHqatf5mMPCZ69 DKZj3Ng72HNGykZh4oH82NW+b3IcSpvqguEtjbJQZH1O4It/C4UhKCp9/VlrqBGAwMv4 gmCr39nh56LFKyo2hdOYbnCwr2Gz2dCBg1iIrVL13RU3ndgd8zEaUN4qPmqUM8EgOgBF TsIscrtliiWKSs71HXe663wdIRoJlS7nfeNpIZShmaU8UFtGjCoqPYA6FVh4mJQPPbNd 5AVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694360007; x=1694964807; 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:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8Eoh6jyNrCcyflp6SfdHYh1h5k3qGCJejop5o3ZzBkI=; b=UmdQecoErwyByrdnpZBfYmbP/Es0TsvYZflkz9kv9ny8mHW4FxRoptlXMbdcOxKu7o fQXx3Ci5/lVksjCAKMAl88mARKJyv0IwkEyQbKeXhiVZIYqGC2sE2I3dV/C8UI/XA2a7 gEEqMdDdi7ARGAyUn6F1VwFtD8G9ySv2JBtLJsBnnwigK6FMY9FElwgFxb9etjdinHHQ eiMkmqfeobmPVsFkODh8iuHDtL8gadZpkcVtxSM+npdAl1EmBF761X2xAEHt8KmNgVAN eyBA1ipRiI/CYgTc/aM/+1f0ZNIY0op0GDjJLPr4eDoqVwO2fyMl7ZR6FhjTwLWfs67K Jh+Q== X-Gm-Message-State: AOJu0YwJ+MFIW4kcF7IRr8HQ6jIJQC8DAm210wtR+9OtPFnHiu0706r7 uiWjus+1ezEndwbSkPxw721To8sSeZBeEEn7RLs= X-Received: by 2002:a7b:cd12:0:b0:3fb:ff34:a846 with SMTP id f18-20020a7bcd12000000b003fbff34a846mr6661892wmj.22.1694360006880; Sun, 10 Sep 2023 08:33:26 -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 u5-20020a05600c00c500b003fe2de3f94fsm7390299wmm.12.2023.09.10.08.33.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Sep 2023 08:33:26 -0700 (PDT) From: "cron2 (Code Review)" X-Google-Original-From: "cron2 (Code Review)" X-Gerrit-PatchSet: 2 Date: Sun, 10 Sep 2023 15:33:25 +0000 Auto-Submitted: auto-generated X-Gerrit-MessageType: merged 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-HTML@gerrit.openvpn.net> MIME-Version: 1.0 User-Agent: Gerrit/3.8.0 X-Spam-Score: 1.0 (+) 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 submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/324?usp=email ) Change subject: dco: fix crash when --multihome is used with --proto tcp Content analysis details: (1.0 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.42 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.42 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 1.2 MISSING_HEADERS Missing To: header 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 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: 1qfMRJ-0005bd-Hj 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?1776665300654248720?= cron2 has submitted this change. ( 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(-) 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; }