| Message ID | 20210714162533.10098-1-david@adalogics.com |
|---|---|
| State | Accepted |
| Headers |
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net> Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director13.mail.ord1d.rsapps.net ([172.31.255.6]) by backend30.mail.ord1d.rsapps.net with LMTP id yIFZKncR72D7AQAAIUCqbw (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) for <patchwork@openvpn.net>; Wed, 14 Jul 2021 12:31:51 -0400 Received: from proxy14.mail.iad3b.rsapps.net ([172.31.255.6]) by director13.mail.ord1d.rsapps.net with LMTP id uBslKncR72CFHAAA91zNiA (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) for <patchwork@openvpn.net>; Wed, 14 Jul 2021 12:31:51 -0400 Received: from smtp1.gate.iad3b ([172.31.255.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy14.mail.iad3b.rsapps.net with LMTPS id mKaNJHcR72CAZgAA+7ETDg (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) for <patchwork@openvpn.net>; Wed, 14 Jul 2021 12:31:51 -0400 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp1.gate.iad3b.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dkim=fail (signature verification failed) header.d=ADALogics2.onmicrosoft.com; dmarc=none (p=nil; dis=none) header.from=adalogics.com X-Suspicious-Flag: YES X-Classification-ID: fd9afc46-e4c0-11eb-9345-5254008fd675-1-1 Received: from [216.105.38.7] ([216.105.38.7:51936] helo=lists.sourceforge.net) by smtp1.gate.iad3b.rsapps.net (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 99/20-19271-6711FE06; Wed, 14 Jul 2021 12:31:51 -0400 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.90_1) (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) id 1m3hmp-0007W7-Co; Wed, 14 Jul 2021 16:31:03 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from <David@Adalogics.com>) id 1m3hmf-0007Ub-6T for openvpn-devel@lists.sourceforge.net; Wed, 14 Jul 2021 16:30:53 +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:Content-Type :Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=KDrIJoUx4uElLPAqYCL3QarGH+Y9mgEKKDpda0O7P+I=; b=F2N908wpWcO8/VDP/prBAHTdeF I4keupdjma078uTNgpFi0x4hmsGpVoiELP528eMXOTAfkk6wEPw6CVGQlcjwpjEm3ttGMA8yv/V70 xjpFK+BTf1JdklsNg3wrQXkjYdXuf+mpV4cNSpnclJsWf95UWis0VNqAWgs3gcNP1oTI=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Content-Type:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=KDrIJoUx4uElLPAqYCL3QarGH+Y9mgEKKDpda0O7P+I=; b=N ApLM5W1Ok16CU+5jb4q1AymimDbVyyQHwrXKpJhVw+5MUhOzmgImbeFgYrhHrQWJPr+Pea3HojC7U 3/90mFctsTLZPXfjrkCIzoVqkeCVsqxIVD0T8+mQFyCpk2miE0sJXDvZCAn8rWSYiy2CYM6sUKRyy NnosbYsz5jpWb81A=; Received: from mail-eopbgr100128.outbound.protection.outlook.com ([40.107.10.128] helo=GBR01-LO2-obe.outbound.protection.outlook.com) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) id 1m3hmU-008Gdz-Oh for openvpn-devel@lists.sourceforge.net; Wed, 14 Jul 2021 16:30:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ePPbKd6QNwYCob2khkTBfInSUSZhWJCDQNZStLRugtQLFpOmriGxMw2J5lqhszzuIZ1sO4ajSiU5U3uaPQttjwf4GnQijANaLtujhwA3HIrmNTyBen4qr+eQh1uB+1L617FNSzsBux70f2iO/naudJSDYVFbq4Mz8wK/txsyVEql0VhX+I51WmZkMbMoWJvYRT0Sd2RR2mxI9+ETEyMxNd8XiKPkPJGx4cI1+I3lzXliUyXyRBZIOThw9wVtFmSEhZ3fELeAr0bDzKbnRmKL4zym4XQla5Bu4/Odsi7eujqtWL+BRdVbtuweBw7pbV5cb72k7Vr4b6Y+oAONkpeb9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KDrIJoUx4uElLPAqYCL3QarGH+Y9mgEKKDpda0O7P+I=; b=BH187cYAtHrciWi1Gg95A+CDAdPXS/wQt9oCAW3mF9LSHblKZw1BPsxH7f8S19/mgGU/G2jiQp7IVQOqvm8oExUVVmhti+j4KJp21eAtw61FHlwb56FkzYPd3RmMAuJg1D3AM/7D5MHg5+MDPn3Y9h1TgwqonDpQAyCpKVkWEc6IOJ9EhD4tiC+ceOMm8Y+++6OgYnn848hMvbOxjza+fibYpDFuqPe/s+Gt9B20rz6WRw78+myWLwrWtXyOC5b5JYIj/5iy4pe8ik1Nlq5xUKa4snkUed0C7TyIVrqyVyYVI+8Ob2m1NH2hI/WRB3jM3KJGoV6TJK87/HPcjPDGDw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=adalogics.com; dmarc=pass action=none header.from=adalogics.com; dkim=pass header.d=adalogics.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ADALogics2.onmicrosoft.com; s=selector2-ADALogics2-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KDrIJoUx4uElLPAqYCL3QarGH+Y9mgEKKDpda0O7P+I=; b=LAgUBZQ4SZUZBkR0q1wbLvLLSbWnMohjaqbJatcTVIY4wS+VjMZ1F548W63kqJcNZeF+5jX/VPGLfpE5vIUn0bCMcx6zaZrtACk84XpuJrj1hRtdv2mWETXwoE0z0uo5yApsUvA3vNwDBURS1odr9xkF6ppivRQyk3So10/+9ag= Received: from LOYP123MB2767.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:e5::7) by LO4P123MB5044.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1f3::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21; Wed, 14 Jul 2021 16:30:35 +0000 Received: from LOYP123MB2767.GBRP123.PROD.OUTLOOK.COM ([fe80::d49f:a292:e4a1:586c]) by LOYP123MB2767.GBRP123.PROD.OUTLOOK.COM ([fe80::d49f:a292:e4a1:586c%3]) with mapi id 15.20.4331.021; Wed, 14 Jul 2021 16:30:35 +0000 From: David Korczynski <david@adalogics.com> To: openvpn-devel@lists.sourceforge.net Date: Wed, 14 Jul 2021 17:25:33 +0100 Message-Id: <20210714162533.10098-1-david@adalogics.com> X-Mailer: git-send-email 2.17.1 X-ClientProxiedBy: LNXP265CA0044.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5c::32) To LOYP123MB2767.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:e5::7) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from davkor.Home (2a02:c7f:d4b1:5200:11fa:4ec:a7a:c717) by LNXP265CA0044.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5c::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21 via Frontend Transport; Wed, 14 Jul 2021 16:30:35 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 97670e3d-a778-4348-b059-08d946e4b53f X-MS-TrafficTypeDiagnostic: LO4P123MB5044: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <LO4P123MB50445633AC3631CD55C22F1FB2139@LO4P123MB5044.GBRP123.PROD.OUTLOOK.COM> X-MS-Oob-TLC-OOBClassifiers: OLM:346; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WEu6TgnyVutlLpd72okudZ3uWaLCEgFOiTjJsqtVneBHp78fMRcU+0fugV07HnurLi3Y2by5IFm5HT2vbIWL9jP7KnySA/A9/Im5szWqJHxZ73djhlXZw+f4tZ6rDwJAH14gXQw0MSLwz+cXzuTVDK+bGu2hEGQJ2F45HhVGxrOxqmTVGqMSPmQMsRusTUY3XGT+utBjHS0yPQVcaHWEJw8TS4PzqumhDTk9AVzzIvfOV9TuFkaTl2gKONQ7beS6Ak+DcuEHUJdryPAfKjDIOE2HXcpebj5rKXRT9n/Ms9qpRP/Sfo7xWZmbR9ucdzcsAkPZ3KsKfSJxxLaymX5IYxHjIjy2ussJgiTxnmq21meH+k/HOCeQNPZ0Oj4gPA4maMMWN/XDDFlIhUmc2/kyUCa7IVuoEV//AnW2kw0JODnf409Fit60UQZ4flraVP7JOx0EfMsdu3m0B2kIq2hiwBE5qXPNe1d3bQMwSsUmW3ClzXLgoUFn0OeFd18//N5RL5MY3ecxwbJnlxWpQXB7t5GjObNBtRRj/dfM61NptjZTKN7H3Zr0Z6GNE8C1GRAQW6V68R6dwojemxXlwTVU9TCZOsNiEAcVxBSO2AuUC1OkuW5/cv/cqxgmicFfTC68ywO3OfT/4qp57Yut+IoJxg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:LOYP123MB2767.GBRP123.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(39830400003)(396003)(136003)(366004)(346002)(376002)(86362001)(8886007)(1076003)(4326008)(186003)(6506007)(6486002)(2906002)(52116002)(478600001)(107886003)(66476007)(66556008)(66946007)(5660300002)(4744005)(36756003)(8676002)(8936002)(2616005)(38100700002)(316002)(6916009)(6512007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: C6Xz3qwdWN+qL4NJAesUvZgcjlQLQNHZhqvTrO+VSOZsZ3USxd4hbrcIN9C1Qi65Au07Ey2OwfjgvyWnvRyVQnycLj0qqzRz0P6L1CuO3kTiaGxfpUbqxS3ZLqJwnxVIhnhBPLrtBYWvKIlBuJ7E7/0sP7OTj0Ql4zcdSvxYKo6kaYz3OSbmIccPZ4pxo7vyBXChRA9DfPI9hKtlnfVMWhf57CbXKMcA/pF+fWYi3F+gB4vwZk5BS1tIJD2A/GfqwCY04s8wQYO2xTRVgVqLI1R0iaXFZIuWspn0toYEuS94/TieZ/pw4Jnf0AqhkBAhhlxvxdWmq+miDL/G8aNPnqVK8+lqd5/71IBi72A2t8KLgsQnNP7EVewp0WrgrXBh92Gu7TEV3N9vRB9YZQ/n6Odw1y9DXIQsIbpICv0rirTNB76pcActY0/VkvzkCJ/L88CjStOzMJxq6FlrirwEaJi216joHPKQ67I9N8tgfoRs1efTnl655LyZ97rS7lBkVU33Uj4TAqhiiaLOgGMc3GyNzCa6wQ9dOhdEP+2AU51NGbnMNPfyShpxUNdunZJ04caU+fq4+ebwYpfnytXOhNw7J3eWdX4SepV1tb8y6ymlEI86mLaCko6ALorjO0yIVLaUbP6FzeEbUn/VhWhzj/E6D+Z2EpmD1Y2ClbNoaD+MXdi1LsU7UqvpTtskqb173O3V465iMnOrIuMsgO2nTw9hfHPc5YPXemmpngtdiC7HzoN76UF70K+WBF/64TJnH9sFpbQBUNWuueHDOf7S6Gl/LK4S3pW7DSyQD/Ti+OM6t92DxaYBI+DWHqdLko3APTRq1Tycin3YMn9z+XpXEMQJcXRXyeRiL75OSB6Ly5XA02/A/RTV4rH5g0YjUtZyLQi+Qd768tyUuELN+VWF7HBBPsl36oqCeQMALqyFN4OoK+AKjsMCoQ1Xqj73gHZTyvtCcpsga3vI1Qv2gqasOP9nsCXruG+XbPHXy6dFOqaZ/DsuuVf/kXqicAJtkCYsueCXk1S7rS8R3P+gR0bUMuwM775FqehEw/UkOnzrAw0gFhK4gvo9b77OtPpSw5R3Bq25Uf4yXBTOxwcn8RsbTzeG0y7ohDjrbndiIlRbC3EgNxvPW4o+57mULhGtwnokxXlp+g41hiqSqc3MaBYjnEViWrfXGQ+thJ63prDFYiQnnq9x8JXjyuQQskX1xmEl/0akKc1ffs93Lr+l/bA6NONOBRkU/YecSlFCMqNK6XT7zOSlgi3YBKAcKLywYOR7veIszt2I/y2Lnw273BCBjUmKlC2IpDEVV3ew3AApjbV/sUiXjOTdI1WBXl+cHyk4DHMLP6pi46dX8qDzZ5ilBGuzzWnZF5uU5QIyQ4807tyJ3o42hLgyh7aZ6aa0VqqJ X-OriginatorOrg: Adalogics.com X-MS-Exchange-CrossTenant-Network-Message-Id: 97670e3d-a778-4348-b059-08d946e4b53f X-MS-Exchange-CrossTenant-AuthSource: LOYP123MB2767.GBRP123.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2021 16:30:35.8506 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4a262c48-49eb-487e-893b-c5902e6682ae X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZEyVG9WX+vHHOGwH97Fx+2tVz+eVA0T8ZPGjQYrQlCmrJqNHj9lSrPGIReMGl2IgCzT83RpYfpC6iy1jK6NLIw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LO4P123MB5044 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: adalogics.com] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [40.107.10.128 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.107.10.128 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-Headers-End: 1m3hmU-008Gdz-Oh Subject: [Openvpn-devel] [PATCH] Fix leaks in route. X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: <openvpn-devel.lists.sourceforge.net> List-Unsubscribe: <https://lists.sourceforge.net/lists/options/openvpn-devel>, <mailto:openvpn-devel-request@lists.sourceforge.net?subject=unsubscribe> List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=openvpn-devel> List-Post: <mailto:openvpn-devel@lists.sourceforge.net> List-Help: <mailto:openvpn-devel-request@lists.sourceforge.net?subject=help> List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/openvpn-devel>, <mailto:openvpn-devel-request@lists.sourceforge.net?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox |
| Series |
[Openvpn-devel] Fix leaks in route.
|
|
Commit Message
david korczynski
July 14, 2021, 6:25 a.m. UTC
Signed-off-by: David Korczynski <david@adalogics.com>
---
src/openvpn/route.c | 2 ++
1 file changed, 2 insertions(+)
--
2.17.1
ADA Logics Ltd is registered in England. No: 11624074.
Registered office: 266 Banbury Road, Post Box 292,
OX2 7DL, Oxford, Oxfordshire , United Kingdom
Comments
Hi, On 14/07/2021 18:25, David Korczynski wrote: > Signed-off-by: David Korczynski <david@adalogics.com> Some commit message is always good - just to give context to the reader without the need to look at the rest of the code. But if Gert is fine without it, I am fine too. > --- > src/openvpn/route.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/openvpn/route.c b/src/openvpn/route.c > index 56fa7717..e429e8c0 100644 > --- a/src/openvpn/route.c > +++ b/src/openvpn/route.c > @@ -1584,6 +1584,7 @@ add_route(struct route_ipv4 *r, > > if (!(r->flags & RT_DEFINED)) > { > + argv_free(&argv); > return; > } > > @@ -1891,6 +1892,7 @@ add_route_ipv6(struct route_ipv6 *r6, const struct tuntap *tt, > > if (!(r6->flags & RT_DEFINED) ) > { > + argv_free(&argv); > return; > } > I agree with Gert that not having RT_DEFINED is indeed impossible with the current code, because that flag is always set when creating a route. However, this function does not know about it and it is correct to keep this check. Since we keep this check, we indeed need to properly bail out and do not leak. Thanks for noticing and fixing this! Acked-by: Antonio Quartulli <antonio@openvpn.net>
Hi, On Thu, Jul 15, 2021 at 08:47:13AM +0200, Antonio Quartulli wrote: > On 14/07/2021 18:25, David Korczynski wrote: > > Signed-off-by: David Korczynski <david@adalogics.com> > > Some commit message is always good - just to give context to the reader > without the need to look at the rest of the code. > > But if Gert is fine without it, I am fine too. I am fine, in this case, as there is not really much to say here - maybe add the explanation "we assume that RT_DEFINED is always set, but still, if it is not, we must not leak memory". I'll merge later today :-) gert
Gert and Antonio, I am not sure if you would want me to change the commit message or not. Let me know if you want me to change it and then I will do that. On 15/07/2021 10:10, Gert Doering wrote: > ADA Logics Ltd is registered in England. No: 11624074. > Registered office: 266 Banbury Road, Post Box 292, > OX2 7DL, Oxford, Oxfordshire , United Kingdom ADA Logics Ltd is registered in England. No: 11624074. Registered office: 266 Banbury Road, Post Box 292, OX2 7DL, Oxford, Oxfordshire , United Kingdom
Hi, On Mon, Jul 19, 2021 at 04:29:32PM +0100, david korczynski wrote: > Gert and Antonio, I am not sure if you would want me to change the > commit message or not. Let me know if you want me to change it and then > I will do that. Nah, I'll adjust the commit message when commiting. (Our rule is: code is never changed compared to what is on the list, whitespace/comments in code can be adjusted if it makes sense and the author is OK, and commit messages can be adjusted if the commit itself is good but there is grammar errors, a link to trac missing, ...) gert
Sounds good, and the rule of committing code sounds good to me! I will be looking to providing more patches based on what the fuzzing finds in the near future. On 19/07/2021 17:11, Gert Doering wrote: > ADA Logics Ltd is registered in England. No: 11624074. > Registered office: 266 Banbury Road, Post Box 292, > OX2 7DL, Oxford, Oxfordshire , United Kingdom ADA Logics Ltd is registered in England. No: 11624074. Registered office: 266 Banbury Road, Post Box 292, OX2 7DL, Oxford, Oxfordshire , United Kingdom
Thanks for your patch. I have not seriously tested (just a basic
compile test) as it is "obviously correct" for that special case.
I have extended the commit message a bit to explain why the change
was done (this is what Antonio was talking about - "help the casual
reader who wants to understand this change in +3 years").
Your patch has been applied to the master, release/2.5 and release/2.4
branch (bugfixes get backported to all supported branches).
commit a11bea18b1c93b260352ec505db15be0ec9431ee (master)
commit 5e88f131b55af96782532f3d1e086de4e17260fe (release/2.5)
commit f2f64e058b819d07da9125824717e4bc4d8f9a9d (HEAD -> release/2.4)
Author: David Korczynski
Date: Wed Jul 14 17:25:33 2021 +0100
Fix argv leaks in add_route() and add_route_ipv6()
Signed-off-by: David Korczynski <david@adalogics.com>
Acked-by: Antonio Quartulli <antonio@openvpn.net>
Message-Id: <20210714162533.10098-1-david@adalogics.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22637.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
--
kind regards,
Gert Doering
diff --git a/src/openvpn/route.c b/src/openvpn/route.c index 56fa7717..e429e8c0 100644 --- a/src/openvpn/route.c +++ b/src/openvpn/route.c @@ -1584,6 +1584,7 @@ add_route(struct route_ipv4 *r, if (!(r->flags & RT_DEFINED)) { + argv_free(&argv); return; } @@ -1891,6 +1892,7 @@ add_route_ipv6(struct route_ipv6 *r6, const struct tuntap *tt, if (!(r6->flags & RT_DEFINED) ) { + argv_free(&argv); return; }