Skip to contentSkip to conversation

openvpn: remove polarssl crypto backend option

PATCH New Gustavo Zacarias 2 participants 3 messages May 14, 2016 – May 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 openvpn: remove polarssl crypto backend option

Now that we need to bump openvpn to version 2.3.11 for security fixes the time has come to remove the polarssl option.
Add legacy handling explaining the situation:
PolarSSL 1.2.x can coexist with mbedTLS 2.x+, but OpenVPN requires PolarSSL/mbedTLS 1.3.x (the transition branch) >= 1.3.8 but doesn't build/work with the 2.x series. And PolarSSL/mbedTLS 1.3.x can't coexist with mbedTLS 2.x on the same target.
So, unfortunately, openssl is now the only option (until libressl arrives) which means no more backend options in general.

---
Change for v2: remove legacy handling for openssl case.

 Config.in.legacy           | 11 +++++++++++
 package/openvpn/Config.in  | 21 +--------------------
 package/openvpn/openvpn.mk | 13 ++-----------
 3 files changed, 14 insertions(+), 31 deletions(-)
Config.in.legacy +11 -0
index 824a220..b9c2f00 100644
@@ -145,6 +145,17 @@ endif
 ###############################################################################
 comment "Legacy options removed in 2016.05"
 
+config BR2_PACKAGE_OPENVPN_CRYPTO_POLARSSL
+	bool "openvpn polarssl crypto backend removed"
+	select BR2_LEGACY
+	help
+	  The OpenVPN polarssl crypto backend option has been removed.
+	  Version from 2.3.10 onwards need polarssl >= 1.3.8 but aren't
+	  compatible with mbedtls (polarssl) series 2.x which is the
+	  version provided in buildroot. And both can't coexist.
+	  It now uses OpenSSL as the only option.
+
+
 config BR2_PACKAGE_NGINX_HTTP_SPDY_MODULE
 	bool "nginx http spdy module removed"
 	select BR2_LEGACY
package/openvpn/Config.in +1 -20
index 2e37125..8ba4ea1 100644
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_OPENVPN
 	bool "openvpn"
 	depends on BR2_USE_MMU # fork()
+	select BR2_PACKAGE_OPENSSL
 	help
 	  OpenVPN is a full-featured SSL VPN solution which can
 	  accomodate a wide range of configurations, including road
@@ -33,24 +34,4 @@ config BR2_PACKAGE_OPENVPN_PWSAVE
 	  Allow --askpass and --auth-user-pass passwords to be read
 	  from a file.
 
-choice
-	prompt "Crypto backend"
-	default BR2_PACKAGE_OPENVPN_CRYPTO_OPENSSL
-	help
-	  Select the cryptographic library to use.
-
-	config BR2_PACKAGE_OPENVPN_CRYPTO_OPENSSL
-	bool "OpenSSL"
-	select BR2_PACKAGE_OPENSSL
-	help
-	  Enable TLS-based key exchange and OpenSSL crypto support.
-
-	config BR2_PACKAGE_OPENVPN_CRYPTO_POLARSSL
-	bool "PolarSSL"
-	select BR2_PACKAGE_POLARSSL
-	help
-	  Enable TLS-based key exchange and PolarSSL crypto support.
-
-endchoice
-
 endif
package/openvpn/openvpn.mk +2 -11
index 8f02792..1d06636 100644
@@ -7,12 +7,13 @@
 OPENVPN_VERSION = 2.3.9
 OPENVPN_SOURCE = openvpn-$(OPENVPN_VERSION).tar.xz
 OPENVPN_SITE = http://swupdate.openvpn.net/community/releases
-OPENVPN_DEPENDENCIES = host-pkgconf
+OPENVPN_DEPENDENCIES = host-pkgconf openssl
 OPENVPN_LICENSE = GPLv2
 OPENVPN_LICENSE_FILES = COPYRIGHT.GPL
 OPENVPN_CONF_OPTS = \
 	--disable-plugin-auth-pam \
 	--enable-iproute2 \
+	--with-crypto-library=openssl \
 	$(if $(BR2_STATIC_LIBS),--disable-plugins)
 OPENVPN_CONF_ENV = IFCONFIG=/sbin/ifconfig \
 	NETSTAT=/bin/netstat \
@@ -47,16 +48,6 @@ else
 OPENVPN_CONF_OPTS += --disable-password-save
 endif
 
-ifeq ($(BR2_PACKAGE_OPENVPN_CRYPTO_OPENSSL),y)
-OPENVPN_CONF_OPTS += --with-crypto-library=openssl
-OPENVPN_DEPENDENCIES += openssl
-endif
-
-ifeq ($(BR2_PACKAGE_OPENVPN_CRYPTO_POLARSSL),y)
-OPENVPN_CONF_OPTS += --with-crypto-library=polarssl
-OPENVPN_DEPENDENCIES += polarssl
-endif
-
 define OPENVPN_INSTALL_TARGET_CMDS
 	$(INSTALL) -m 755 $(@D)/src/openvpn/openvpn \
 		$(TARGET_DIR)/usr/sbin/openvpn
Signature · 1 line
2.7.3
#1 lore raw

PATCH v2 2/2 openvpn: security bump to version 2.3.11

Fixed port-share bug with DoS potential.
Fix buffer overflow by user supplied data.

---
Change for v2: none.

 package/openvpn/openvpn.hash | 2 +-
 package/openvpn/openvpn.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
package/openvpn/openvpn.hash +1 -1
index 4ab916e..179198e 100644
@@ -1,2 +1,2 @@
 # Locally calculated after checking pgp signature
-sha256	52f16bef3a02369682f1464fbd2821070c98d0bd993f4c46c764e87375abdcc1 	openvpn-2.3.9.tar.xz
+sha256	0f5f1ca1dc5743fa166d93dd4ec952f014b5f33bafd88f0ea34b455cae1434a7 	openvpn-2.3.11.tar.xz
package/openvpn/openvpn.mk +1 -1
index 1d06636..f3985cd 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-OPENVPN_VERSION = 2.3.9
+OPENVPN_VERSION = 2.3.11
 OPENVPN_SOURCE = openvpn-$(OPENVPN_VERSION).tar.xz
 OPENVPN_SITE = http://swupdate.openvpn.net/community/releases
 OPENVPN_DEPENDENCIES = host-pkgconf openssl
Signature · 1 line
2.7.3
#2 lore raw

PATCH v2 1/2 openvpn: remove polarssl crypto backend option

In reply to Gustavo Zacarias

Hello,

Quoted 10 lines · Gustavo Zacarias

Now that we need to bump openvpn to version 2.3.11 for security fixes the time has come to remove the polarssl option.
Add legacy handling explaining the situation:
PolarSSL 1.2.x can coexist with mbedTLS 2.x+, but OpenVPN requires PolarSSL/mbedTLS 1.3.x (the transition branch) >= 1.3.8 but doesn't build/work with the 2.x series. And PolarSSL/mbedTLS 1.3.x can't coexist with mbedTLS 2.x on the same target.
So, unfortunately, openssl is now the only option (until libressl arrives) which means no more backend options in general.

Quoted 3 lines

---
Change for v2: remove legacy handling for openssl case.

Both applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com