summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-15 02:52:48 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-15 02:52:48 -0500
commit18a65fbf51a803457ba63aceadd52cbb27fc6b7e (patch)
tree9232555eb030ede6dcc2cdb99c32ace0e7264eaf
parent847761ee92ded0fabdcbeb077045d8ce1a5d2899 (diff)
downloadpackages-18a65fbf51a803457ba63aceadd52cbb27fc6b7e.tar.gz
packages-18a65fbf51a803457ba63aceadd52cbb27fc6b7e.tar.bz2
packages-18a65fbf51a803457ba63aceadd52cbb27fc6b7e.tar.xz
packages-18a65fbf51a803457ba63aceadd52cbb27fc6b7e.zip
system/openssl: [sec] bump to 1.0.2o
-rw-r--r--system/openssl/3001-CVE-2018-0737.patch28
-rw-r--r--system/openssl/3002-CVE-2018-0732.patch39
-rw-r--r--system/openssl/APKBUILD26
3 files changed, 84 insertions, 9 deletions
diff --git a/system/openssl/3001-CVE-2018-0737.patch b/system/openssl/3001-CVE-2018-0737.patch
new file mode 100644
index 000000000..162dc3d7f
--- /dev/null
+++ b/system/openssl/3001-CVE-2018-0737.patch
@@ -0,0 +1,28 @@
+From 349a41da1ad88ad87825414752a8ff5fdd6a6c3f Mon Sep 17 00:00:00 2001
+From: Billy Brumley <bbrumley@gmail.com>
+Date: Wed, 11 Apr 2018 10:10:58 +0300
+Subject: [PATCH] RSA key generation: ensure BN_mod_inverse and BN_mod_exp_mont
+ both get called with BN_FLG_CONSTTIME flag set.
+
+CVE-2018-0737
+
+Reviewed-by: Rich Salz <rsalz@openssl.org>
+Reviewed-by: Matt Caswell <matt@openssl.org>
+(cherry picked from commit 6939eab03a6e23d2bd2c3f5e34fe1d48e542e787)
+---
+ crypto/rsa/rsa_gen.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/crypto/rsa/rsa_gen.c b/crypto/rsa/rsa_gen.c
+index 9ca5dfefb70..42b89a8dfaa 100644
+--- a/crypto/rsa/rsa_gen.c
++++ b/crypto/rsa/rsa_gen.c
+@@ -156,6 +156,8 @@ static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value,
+ if (BN_copy(rsa->e, e_value) == NULL)
+ goto err;
+
++ BN_set_flags(rsa->p, BN_FLG_CONSTTIME);
++ BN_set_flags(rsa->q, BN_FLG_CONSTTIME);
+ BN_set_flags(r2, BN_FLG_CONSTTIME);
+ /* generate p and q */
+ for (;;) {
diff --git a/system/openssl/3002-CVE-2018-0732.patch b/system/openssl/3002-CVE-2018-0732.patch
new file mode 100644
index 000000000..148e7c3bc
--- /dev/null
+++ b/system/openssl/3002-CVE-2018-0732.patch
@@ -0,0 +1,39 @@
+From 3984ef0b72831da8b3ece4745cac4f8575b19098 Mon Sep 17 00:00:00 2001
+From: Guido Vranken <guidovranken@gmail.com>
+Date: Mon, 11 Jun 2018 19:38:54 +0200
+Subject: [PATCH] Reject excessively large primes in DH key generation.
+
+CVE-2018-0732
+
+Signed-off-by: Guido Vranken <guidovranken@gmail.com>
+
+(cherry picked from commit 91f7361f47b082ae61ffe1a7b17bb2adf213c7fe)
+
+Reviewed-by: Tim Hudson <tjh@openssl.org>
+Reviewed-by: Matt Caswell <matt@openssl.org>
+(Merged from https://github.com/openssl/openssl/pull/6457)
+---
+ crypto/dh/dh_key.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/crypto/dh/dh_key.c b/crypto/dh/dh_key.c
+index 387558f1467..f235e0d682b 100644
+--- a/crypto/dh/dh_key.c
++++ b/crypto/dh/dh_key.c
+@@ -130,10 +130,15 @@ static int generate_key(DH *dh)
+ int ok = 0;
+ int generate_new_key = 0;
+ unsigned l;
+- BN_CTX *ctx;
++ BN_CTX *ctx = NULL;
+ BN_MONT_CTX *mont = NULL;
+ BIGNUM *pub_key = NULL, *priv_key = NULL;
+
++ if (BN_num_bits(dh->p) > OPENSSL_DH_MAX_MODULUS_BITS) {
++ DHerr(DH_F_GENERATE_KEY, DH_R_MODULUS_TOO_LARGE);
++ return 0;
++ }
++
+ ctx = BN_CTX_new();
+ if (ctx == NULL)
+ goto err;
diff --git a/system/openssl/APKBUILD b/system/openssl/APKBUILD
index da5f61799..c9ec7f569 100644
--- a/system/openssl/APKBUILD
+++ b/system/openssl/APKBUILD
@@ -1,20 +1,20 @@
-# Maintainer: Timo Teras <timo.teras@iki.fi>
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=openssl
-pkgver=1.0.2n
+pkgver=1.0.2o
pkgrel=0
pkgdesc="Toolkit for SSL v2/v3 and TLS v1"
-url="http://openssl.org"
+url="https://www.openssl.org/"
+arch="all"
+license="openssl"
depends=
makedepends_build="perl"
makedepends_host="zlib-dev"
makedepends="$makedepends_host $makedepends_build"
depends_dev="zlib-dev"
checkdepends="perl"
-provides="libressl=9999"
-arch="all"
-license="openssl"
-subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc libcrypto1.0:libcrypto libssl1.0:libssl"
+subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc libcrypto1.0:libcrypto
+ libssl1.0:libssl"
source="http://www.openssl.org/source/${pkgname}-${pkgver}.tar.gz
0002-busybox-basename.patch
@@ -28,6 +28,8 @@ source="http://www.openssl.org/source/${pkgname}-${pkgver}.tar.gz
1001-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.patch
1002-backport-changes-from-upstream-padlock-module.patch
1003-engines-e_padlock-implement-sha1-sha224-sha256-accel.patch
+ 3001-CVE-2018-0737.patch
+ 3002-CVE-2018-0732.patch
"
# secfixes:
@@ -59,6 +61,10 @@ source="http://www.openssl.org/source/${pkgname}-${pkgver}.tar.gz
# 1.0.2n-r0:
# - CVE-2017-3737
# - CVE-2017-3738
+# 1.0.2o-r0:
+# - CVE-2018-0739
+# - CVE-2018-0737
+# - CVE-2018-0732
builddir="$srcdir"/$pkgname-$pkgver
@@ -137,7 +143,7 @@ dev() {
default_dev
}
-sha512sums="144bf0d6aa27b4af01df0b7b734c39962649e1711554247d42e05e14d8945742b18745aefdba162e2dfc762b941fd7d3b2d5dc6a781ae4ba10a6f5a3cadb0687 openssl-1.0.2n.tar.gz
+sha512sums="8a2c93657c85143e76785bb32ee836908c31a6f5f8db993fa9777acba6079e630cdddd03edbad65d1587199fc13a1507789eacf038b56eb99139c2091d9df7fd openssl-1.0.2o.tar.gz
2244f46cb18e6b98f075051dd2446c47f7590abccd108fbab707f168a20cad8d32220d704635973f09e3b2879f523be5160f1ffbc12ab3900f8a8891dc855c5c 0002-busybox-basename.patch
58e42058a0c8086c49d681b1e226da39a8cf8cb88c51cf739dec2ff12e1bb5d7208ac5033264b186d58e9bdfe992fe9ddb95701d01caf1824396b2cefe30c0a4 0003-use-termios.patch
c67472879a31b5dbdd313892df6d37e7c93e8c0237d406c30d50b1016c2618ead3c13277f5dc723ef1ceed092d36e3c15a9777daa844f59b9fa2b0a4f04fd9ae 0004-fix-default-ca-path-for-apps.patch
@@ -148,4 +154,6 @@ c67472879a31b5dbdd313892df6d37e7c93e8c0237d406c30d50b1016c2618ead3c13277f5dc723e
5febe20948e3f12d981e378e1f4ea538711657aacb6865a1aa91339d4a04277e250f490a1f2abc2c6f290bdc2b1bffdba1d00983b4c09f7ea983eef8163f9420 0010-ssl-env-zlib.patch
8c181760d7a149aa18d246d50f1c0438ffb63c98677b05306dfc00400ad0429b47d31e7c8d85126005c67f743d23e7a8a81174ffe98556f4caf9cf6b04d9ff17 1001-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.patch
a3555440b5f544bfd6b9ad97557d8f4c1d673f6a35219f65056a72035d186be5f354717ddf9784899b602464d48657b090ade24379552d43af97609c0f48c389 1002-backport-changes-from-upstream-padlock-module.patch
-6353c7a94016c20db5d683dde37775f6780952ecdb1a5f39f878d04ba37f6ad79ae10fb6d65d181d912505a5d1e22463004cd855d548b364c00b120da2b0fdbc 1003-engines-e_padlock-implement-sha1-sha224-sha256-accel.patch"
+6353c7a94016c20db5d683dde37775f6780952ecdb1a5f39f878d04ba37f6ad79ae10fb6d65d181d912505a5d1e22463004cd855d548b364c00b120da2b0fdbc 1003-engines-e_padlock-implement-sha1-sha224-sha256-accel.patch
+70be7fb9abad901fd84e8028e328c5b2fb7feff18547cfb749c5f59faf06eceab9052f9979d721670f6f3e099ba59761e8394e986565d349dd25e9718eaa99f0 3001-CVE-2018-0737.patch
+ff91298629f157496a012da00ba7325923f5d087bfa54b60e205bf2dfb06374e958912e0df39dbdf39773555455c1a3afa3dcde1ddfec6e85cf89b0b62cc0eb4 3002-CVE-2018-0732.patch"