From patchwork Thu Nov 12 21:43:25 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 5683 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:6022:529c:b0:11a:a05e:cb97 with SMTP id x28csp2527042lax; Thu, 12 Nov 2026 13:43:45 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErHHbmzTYXzkbQx/H7Q/LQG1aleXM1w7XRd0G9SOJKlNIxzf8BMddDAErXfLLMrzhdzypiC1Pi4AjWg=@openvpn.net X-Received: by 2002:a05:701b:4587:b0:1b2:6844:25c9 with SMTP id a92af1059eb24-1b5030613dbmr659610c88.3.1794519825575; Thu, 12 Nov 2026 13:43:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1794519825; cv=none; d=google.com; s=arc-20260327; b=LId7/2/oTq8MPUFUJGz2QTm4cciymnD/ELyXNpKZ3EkROUGv7b0SeLUCW6UucGFrMk UL1MuHvDADTloW14NsITarOinhLAH5XSKRmRFOD/e8U+vLlteWu47ftYese6GiQCphet qDjnMhbqPOHgYcj5uOLPMVOnpWn8/QRR4Ht+wz7coSiJWCpjnxhakJ0z7+VDpIMBqFx+ 02mYd4mfKVlTEeNBwO/pOkUZXAxhzDO3ohtVJWofo1sSVWMtfcfmTpZhqXj3tyGoRFOl J6gwSf7FYzjKCK90HheMg9OvT1Zcs0PF/g82r2Vli58gbo5rksZBqzyIIJpW8hG5sxI9 0YyA== 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=h6PqYWR3QPBx5w/GRyy2P/hLDRyEzpPND5wFBnuparc=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=bonHqUh4fXWOfKYxfJkfq7cx+q+Y/cBSY9O3DFtU/84hM3UPCk1rsM4VLBuFEcCSoq l465CKw+WXAgNlfp+ZLR2hZDVxKSJz+td4cqsm63iV4YOcgiFjjor1s6xu/nAghRoB77 v+ySs1aRfIYV1D+UoCXToLtBEd4Z27COFw9FuV48W9UA86qjpMu13ENvXuzdCQZ9EML9 VAuLIrYEJJzF3Nux8tmp1s178Yl7iPNTOUy6jYXNuK4CwprInuQ0sEFIwCG6DvzV5nyR L9D/XhUATi56ss/fG5yPDF3jm4ruGMYq8RTU/2XebbxVBpMXXXlcamLBjx0oayT47a7z JsJw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=AOT+SAtB; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=WGJYLESU; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="O+uu/J8U"; 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 a92af1059eb24-1b5032374desi1731342c88.57.2026.11.12.13.43.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Nov 2026 13:43:45 -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=AOT+SAtB; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=WGJYLESU; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="O+uu/J8U"; 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=h6PqYWR3QPBx5w/GRyy2P/hLDRyEzpPND5wFBnuparc=; b=AOT+SAtBmECURs pDcgVHcWlv/n840rp6lmGo9Hi63b/337GMwWJRmBfIw3BNZUa3bovuBgAxEcBkahAo7nZvZddl/Ne exmYpV4C5GrxzdjsQr9r/ftVca+axemwV1wHmBVtlRysBfqXjIjfv+ikdDMcSd8GfBzC0JFB251mm dvo=; Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.100.1) (envelope-from ) id 1xRca7-000000002wV-3Mtu; Thu, 12 Nov 2026 21:43:43 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.100.1) (envelope-from ) id 1xRca3-000000002vz-41HW for openvpn-devel@lists.sourceforge.net; Thu, 12 Nov 2026 21:43:39 +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=p0x2LKiJwCL9x72lk2qYI1IU1WkTMgpB0AZFutNGfto=; b=WGJYLESUBVxOKsINvHgWoiVYXA Ga0GYo5BfC25ggjuFNYV45VDqXL1J0ljB97tBnQYPhzYaiC+EvlkFBAcKYHn5PArP7MD6cO2P3ENi MpjqIxcFyyXDJwSq45E6nk40S2uROZ5GEwn4D/Ohq8FkIfkud2YGrzxCtaooVBAC+0TQ=; 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=p0x2LKiJwCL9x72lk2qYI1IU1WkTMgpB0AZFutNGfto=; b=O+uu/J8UpqSBe0vvaL238I/ZDJ ISl9bPz9CfTVy3wew6HF8DGBkztRn1itrnesMkKn3EQ0piLCGntz4yilY/fT0ChavzEVH2/SGKxwt 6nmvbfRnRnzVYZJo3SepG6kMygu1KcARuPqX7MMp8QzYXoTxtNbIOBcfuoXPQYII46n4=; Received: from [193.149.48.129] (helo=blue.greenie.muc.de) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.100.1) id 1xRca1-00000000150-1pLl for openvpn-devel@lists.sourceforge.net; Thu, 12 Nov 2026 21:43:38 +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 6ACLhUjT013720 for ; Thu, 12 Nov 2026 22:43:30 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 6ACLhUgk013719 for openvpn-devel@lists.sourceforge.net; Thu, 12 Nov 2026 22:43:30 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Thu, 12 Nov 2026 22:43:25 +0100 Message-ID: <20261112214330.13701-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 error path returned without EVP_MD_free(). Change-Id: Ie87632ae3503f4c74b327186e6952f66ada66640 Signed-off-by: Razvan Cojocaru Acked-by: Frank Lichtenheld Gerrit URL: https://gerrit.openvpn.net/c/o [...] Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_DNSWL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to DNSWL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#DnsBlocklists-dnsbl-block for more information. [193.149.48.129 listed in list.dnswl.org] 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1xRca1-00000000150-1pLl Subject: [Openvpn-devel] [PATCH v1] xkey_digest: free the EVP_MD when EVP_Digest() fails 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: 1881690420788696678 X-GMAIL-MSGID: 1881690420788696678 From: Razvan Cojocaru The error path returned without EVP_MD_free(). Change-Id: Ie87632ae3503f4c74b327186e6952f66ada66640 Signed-off-by: Razvan Cojocaru Acked-by: Frank Lichtenheld Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2178 --- 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/+/2178 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Frank Lichtenheld diff --git a/src/openvpn/xkey_helper.c b/src/openvpn/xkey_helper.c index 6908cbb..fb088a8 100644 --- a/src/openvpn/xkey_helper.c +++ b/src/openvpn/xkey_helper.c @@ -71,12 +71,13 @@ } unsigned int len = (unsigned int)*buflen; - if (EVP_Digest(src, srclen, buf, &len, md, NULL) != 1) + int ret = EVP_Digest(src, srclen, buf, &len, md, NULL); + EVP_MD_free(md); + if (ret != 1) { msg(M_WARN, "WARN: xkey_digest: EVP_Digest failed"); return 0; } - EVP_MD_free(md); *buflen = len; return 1;