From patchwork Thu Nov 19 21:21: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: 5751 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:6022:231a:b0:11b:d6c:f273 with SMTP id cr26csp597019lab; Thu, 19 Nov 2026 13:22:07 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErFeqIFNQpIOyj+4HQ0V7T45v6VrFfWaNMmC0bhAOQAx9oMsgb3S9qup+5fBdTu2cJFUDmlIx2lToA0=@openvpn.net X-Received: by 2002:a05:693c:8312:b0:358:c5c9:2661 with SMTP id 5a478bee46e88-38570742205mr497410eec.10.1795123327433; Thu, 19 Nov 2026 13:22:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1795123327; cv=none; d=google.com; s=arc-20260327; b=jPZCQhsbe2oaa26XEHB2y7ZGJWsptZFjVPyruj3HQibxsRLa/VMSm6wb9tpKuHlhJi /61bD+bGFELSl1iG8FQJdCfecLwHIseAyM/swdfQmrfBAd9nNQVukKfBZbBOS2HqRNni s5Lun6VNcx64cDDoWp64vd9a1Q3mrj7tZUyfn92e8umg+XF8V6nMpRyy/4zZMzrQ46Ul auG1R3XziubClBKTOXbkfu8FrMiYCyLxPAqsEOUUm0miz95ciRst8lHHV1o/U4ZTIIm9 iEoL56b2lJ1DUukA5C92x9I/UQaCoX3ZDbwWyjvOZm1gPd0TFCEWWxWAk0JWiHQOPUsj OduQ== 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=QIkJ3BMV7MFzUn2IdkJkxzHNglJIuSUplrTSt1hgDR4=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=WfvKizWlIRm0UhebKCL8QhbMt1m6EXkPjZlf8XG4Mn74Q8X4T2BCUtFBev42T+egqo Tr89FG1kYZ5R6C7dmd5HfGgCj2mAPxWxqqeAt95bkHxNyeEjm97BUJRT4ljw/7YcT7sR fF0a1PWsNbP6vAeBP6MdzfYlQXvVqo7b+gywYPot1sNGgiKwvWIOyZ7LNwPr1I6JKxyw r0/toCseBE/QUjK5TeustG2Des0PHUJ3oASRe3W6VJds77ubluYHAARfrCeEuBU6Kuvw krNK+MZib4z1+JM6ekG0b98Ktkjp8rcPxc1ZS4SZXMLsf+upBp5Kd64qVH890FleQr71 v9XQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=O06zFv7f; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=NLmK1G6i; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=a7QmdAlr; 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-38567abb4d6si1623017eec.45.2026.11.19.13.22.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Nov 2026 13:22:07 -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=O06zFv7f; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=NLmK1G6i; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=a7QmdAlr; 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=QIkJ3BMV7MFzUn2IdkJkxzHNglJIuSUplrTSt1hgDR4=; b=O06zFv7fcmYTtA zi8AyMX8KBE45PYuXb3fM4BQg7LKq4YfOv9EnFVEwsSQlXo/YodQ1z0rkdmw9MrprDFD0ZBY/Raa3 uBvOSS929zFiQZlPOyiAfRfrKg08CRiRicK3W6DNnbAMcgvA8CkRmpiPkCFhS5Ez4gjsfwP6qQxB8 xrE=; 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 1xU9Zs-000000006B7-36c2; Thu, 19 Nov 2026 21:21:56 +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 1xU9Zp-000000006Ax-1aFi for openvpn-devel@lists.sourceforge.net; Thu, 19 Nov 2026 21:21: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: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=S5t1oNR4o5fN+WBiYXHolx43yHAmyPHQMP74PRg35FE=; b=NLmK1G6ij5jJgrAPy9rYK11nMD QEvzZ5oZO7P2/citK2LtZsnJ8t883L6qKNOu6mcilwoOmuHeEWfhpFi6X8/D1OQEHWIXmIFsuMm8Z DfRZt2PWTCg0gm5EqkA30HpJLdncJ/KVj5/NyqdcvdtpTPLsn5d5rKTFtbKl1rylk+9Y=; 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=S5t1oNR4o5fN+WBiYXHolx43yHAmyPHQMP74PRg35FE=; b=a7QmdAlrLSIhVA1qCzZGr8yEgi nkJGNfIv/KNL0ngrQiMdTJMqjOXkBrpQWHeASephrbEccIk4ty5KUpJVqxvgKc72lC9LPmYRkCEm3 FVN+jvYF2gIa3PFqAdt62V53iAyJI2Xvkmry4GnwGiUurBmFnt89Q8FeltVy3jU4yP2I=; 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 1xU9Zn-000000004Mz-1RUm for openvpn-devel@lists.sourceforge.net; Thu, 19 Nov 2026 21:21:53 +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 6AJLLhjJ005430 for ; Thu, 19 Nov 2026 22:21:43 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 6AJLLhGn005429 for openvpn-devel@lists.sourceforge.net; Thu, 19 Nov 2026 22:21:43 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Thu, 19 Nov 2026 22:21:36 +0100 Message-ID: <20261119212143.5413-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 file holding the client's challenge response was never deleted, although the manual says it is removed after the script returns. The --auth-user-pass-verify via-file credentials file was kept when [...] 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: 1xU9Zn-000000004Mz-1RUm Subject: [Openvpn-devel] [PATCH v3] ssl_verify: remove script temp files on all exit paths 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: 1882323237872088678 X-GMAIL-MSGID: 1882323237872088678 From: Razvan Cojocaru The file holding the client's challenge response was never deleted, although the manual says it is removed after the script returns. The --auth-user-pass-verify via-file credentials file was kept when the deferred auth control files could not be created. Unlink both on every exit path. Change-Id: Ifbd6badab31a48653fa0bca7f086db058f83f891 Signed-off-by: Razvan Cojocaru Acked-by: Arne Schwabe Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2191 --- 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/+/2191 This mail reflects revision 3 of this Change. Acked-by according to Gerrit (reflected above): Arne Schwabe diff --git a/src/openvpn/ssl_verify.c b/src/openvpn/ssl_verify.c index 8641d15..75cda97 100644 --- a/src/openvpn/ssl_verify.c +++ b/src/openvpn/ssl_verify.c @@ -1372,7 +1372,7 @@ "could not create deferred auth control file", __func__); retval = OPENVPN_PLUGIN_FUNC_ERROR; - goto error; + goto done; } /* call command */ @@ -1415,7 +1415,6 @@ platform_unlink(tmp_file); } -error: if (!session->opt->auth_user_pass_verify_script_via_file) { setenv_del(session->opt->es, "password"); @@ -1487,6 +1486,10 @@ tls_deauthenticate(multi); } done: + if (tmp_file) + { + platform_unlink(tmp_file); + } argv_free(&argv); gc_free(&gc); }