diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-06-21 13:07:15 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-06-21 13:11:35 +0000 |
commit | 2258fe946d55022e3e8503b306eeabf6858ef89b (patch) | |
tree | bf15bc634c67fd1ac399fde9bcecc9e53b1a7dbd /main | |
parent | 505340c76f71d3f7d7d1a1439a2d65740036c297 (diff) | |
download | aports-2258fe946d55022e3e8503b306eeabf6858ef89b.tar.bz2 aports-2258fe946d55022e3e8503b306eeabf6858ef89b.tar.xz |
main/openssl: fix CVE-2018-0737
fixes #9008
Diffstat (limited to 'main')
-rw-r--r-- | main/openssl/APKBUILD | 8 | ||||
-rw-r--r-- | main/openssl/CVE-2018-0732.patch | 39 |
2 files changed, 45 insertions, 2 deletions
diff --git a/main/openssl/APKBUILD b/main/openssl/APKBUILD index d09400cd2d..c446584683 100644 --- a/main/openssl/APKBUILD +++ b/main/openssl/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Timo Teras <timo.teras@iki.fi> pkgname=openssl pkgver=1.0.2o -pkgrel=0 +pkgrel=1 pkgdesc="Toolkit for SSL v2/v3 and TLS v1" url="http://openssl.org" depends= @@ -26,6 +26,7 @@ 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 + CVE-2018-0732.patch " # secfixes: @@ -61,6 +62,8 @@ source="http://www.openssl.org/source/${pkgname}-${pkgver}.tar.gz # - CVE-2017-3738 # - CVE-2018-0733 # - CVE-2018-0739 +# 1.0.2o-r1: +# - CVE-2018-0732 builddir="$srcdir"/$pkgname-$pkgver @@ -143,4 +146,5 @@ 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 +ff91298629f157496a012da00ba7325923f5d087bfa54b60e205bf2dfb06374e958912e0df39dbdf39773555455c1a3afa3dcde1ddfec6e85cf89b0b62cc0eb4 CVE-2018-0732.patch" diff --git a/main/openssl/CVE-2018-0732.patch b/main/openssl/CVE-2018-0732.patch new file mode 100644 index 0000000000..148e7c3bc1 --- /dev/null +++ b/main/openssl/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; |