From patchwork Wed Apr 7 09:15:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maximilian Fillinger X-Patchwork-Id: 1722 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director13.mail.ord1d.rsapps.net ([172.27.255.52]) by backend30.mail.ord1d.rsapps.net with LMTP id IIAaHW4FbmCJTgAAIUCqbw (envelope-from ) for ; Wed, 07 Apr 2021 15:18:06 -0400 Received: from proxy3.mail.iad3a.rsapps.net ([172.27.255.52]) by director13.mail.ord1d.rsapps.net with LMTP id ED7gHG4FbmAsQQAA91zNiA (envelope-from ) for ; Wed, 07 Apr 2021 15:18:06 -0400 Received: from smtp52.gate.iad3a ([172.27.255.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy3.mail.iad3a.rsapps.net with LMTPS id QK72FW4FbmA8PQAAYaqY3Q (envelope-from ) for ; Wed, 07 Apr 2021 15:18:06 -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: smtp52.gate.iad3a.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 (key not found in DNS) header.d=foxcrypto.com; dmarc=fail (p=none; dis=none) header.from=foxcrypto.com X-Suspicious-Flag: YES X-Classification-ID: fa2dc756-97d5-11eb-b6d0-525400a7d0a1-1-1 Received: from [216.105.38.7] ([216.105.38.7:46992] helo=lists.sourceforge.net) by smtp52.gate.iad3a.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id B0/C5-21466-D650E606; Wed, 07 Apr 2021 15:18:05 -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 ) id 1lUDfv-00042l-GV; Wed, 07 Apr 2021 19:17:15 +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 ) id 1lUDft-00042T-GE for openvpn-devel@lists.sourceforge.net; Wed, 07 Apr 2021 19:17:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:MIME-Version:Date:Subject:CC:To:From: Sender:Reply-To:Message-ID:Content-Transfer-Encoding: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=BIsdK6/btF6B9OEBGuf4A30wtrlduytoEiUr9ZAfXHg=; b=GzPFMXquAAq7ojtXbmqcuNADgg tdPUKjHQIh+IywXApk7abiGmYahvZiHgSSd0O2wR8WqVj+psKupmpdpASH4waFUrXbuba01i8Umz9 PX96F1x0F85DMmMyfK4Azhl2g7H5fwCf2+dYCh+l/9S2sKSZUiTKW2BHWRsdGtWGoafI=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:MIME-Version:Date:Subject:CC:To:From:Sender:Reply-To: Message-ID:Content-Transfer-Encoding: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=BIsdK6/btF6B9OEBGuf4A30wtrlduytoEiUr9ZAfXHg=; b=gfy6NjC8Kr3APKCp6F3/9LegJZ 8kuSCzspW3XMfsAeL5+Qm+DqQq8u+u8ho3Gmb9Dni73a7w8UIe3a3dZ2st32SAXQPi3XWICyUgOOz y839v24l5fNQcfq19dcT6HgQKpbw2UDbyMIkgVMzCtKszlg9V9aYiU2i4OiSfJ5GuGCU=; Received: from nl-dft-mx-01.fox-it.com ([178.250.144.135]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) id 1lUDfj-0007Cm-Va for openvpn-devel@lists.sourceforge.net; Wed, 07 Apr 2021 19:17:13 +0000 From: Max Fillinger To: Date: Wed, 7 Apr 2021 21:15:53 +0200 X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 X-ClientProxiedBy: FOXDFT1EX01.FOX.local (10.0.0.129) To FOXDFT1EX01.FOX.local (10.0.0.129) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; d=foxcrypto.com; s=NL-DFT-MX-01; c=relaxed/relaxed; h=from:to:cc:subject:date:mime-version:content-type; bh=BIsdK6/btF6B9OEBGuf4A30wtrlduytoEiUr9ZAfXHg=; b=MXxKyB+/3eFV7TWRiodlSFneKGmOCmPG/mvRakkj8lrk5mjL3msXeV5RfTknB6WhvnIwpn7a+BWP k5O8vS34QrB5vdZ9FB2HbUAtMjnFndZhjBs6H+RD5VKjw9mz0Uuox95vm/k3mUB+D+z2aT0SIsiO QJsdq6gjMlRKDvdJfJx/KJCr5c6xP+xAGQInG8bD55PNb0PJ1xQYo+ucI39aqITH2qqSDvgm9dQ6 Ys1C7uvm74X/la7GV5q73dvMYhyDmUNGfp9KaPN1XsWKxJOpwXriY7+mL+Qxh67zeUCiCaophRQ4 WRXLz0Ii8lZxTPK8ZNSCzx0KWDCkAf0AF6tjxw== X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 1.0 MISSING_MID Missing Message-Id: header 0.1 DKIM_INVALID DKIM or DK signature exists, but is not valid X-Headers-End: 1lUDfj-0007Cm-Va Subject: [Openvpn-devel] [PATCH 0/1] CRL issues with mbedtls 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 Message-Id: X-getmail-retrieved-from-mailbox: Inbox This patch fixes the bug I wrote about earlier[0] where the mbedtls version of OpenVPN might not properly reload a CRL when running in a chroot. I've submitted a somewhat hacky patch for it[1]. While looking into it further, I also noticed another unrelated problem: The mbedtls documentation states that the config struct for a mbedtls_ssl_context is not supposed to be modified after calling mbedtls_ssl_setup(). However, the config contains a pointer to the CRL, and we're currently modifying the CRL in place when we reload it. I figured that by reworking the way CRLs are handled, I could fix the CRL reloading bug in a less hacky manner and also make sure that we don't modify the configs of active mbedtls_ssl_contexts. [0] https://sourceforge.net/p/openvpn/mailman/message/37254045/ [1] https://sourceforge.net/p/openvpn/mailman/message/37254048/ Max Fillinger (1): Rework mbedtls CRL handling src/openvpn/ssl.c | 8 +++ src/openvpn/ssl_mbedtls.c | 103 ++++++++++++++++++++++++++++++++++----- src/openvpn/ssl_mbedtls.h | 25 +++++++++- src/openvpn/ssl_verify_mbedtls.c | 2 +- 4 files changed, 125 insertions(+), 13 deletions(-)