diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2018-10-29 14:02:33 +0100 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2018-10-29 14:08:20 +0100 |
commit | 9cf9aa64d52743263e9619c3cd0794557e3b5445 (patch) | |
tree | 9a6b7cc427166ea846a807b6e36f478a98305e67 /dev-libs/openssl | |
parent | app-backup/bacula: Add 9.2.1 release. (diff) | |
download | gentoo-9cf9aa64d52743263e9619c3cd0794557e3b5445.tar.gz gentoo-9cf9aa64d52743263e9619c3cd0794557e3b5445.tar.bz2 gentoo-9cf9aa64d52743263e9619c3cd0794557e3b5445.zip |
dev-libs/openssl: Revbumps to fix CVE-2018-0735
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
Diffstat (limited to 'dev-libs/openssl')
-rw-r--r-- | dev-libs/openssl/files/openssl-1.1.0i-CVE-2018-0735.patch | 44 | ||||
-rw-r--r-- | dev-libs/openssl/files/openssl-1.1.1-CVE-2018-0735.patch | 44 | ||||
-rw-r--r-- | dev-libs/openssl/openssl-1.1.0i-r1.ebuild (renamed from dev-libs/openssl/openssl-1.1.0i.ebuild) | 5 | ||||
-rw-r--r-- | dev-libs/openssl/openssl-1.1.1-r1.ebuild (renamed from dev-libs/openssl/openssl-1.1.1.ebuild) | 4 |
4 files changed, 95 insertions, 2 deletions
diff --git a/dev-libs/openssl/files/openssl-1.1.0i-CVE-2018-0735.patch b/dev-libs/openssl/files/openssl-1.1.0i-CVE-2018-0735.patch new file mode 100644 index 000000000000..5762c04fa340 --- /dev/null +++ b/dev-libs/openssl/files/openssl-1.1.0i-CVE-2018-0735.patch @@ -0,0 +1,44 @@ +From 56fb454d281a023b3f950d969693553d3f3ceea1 Mon Sep 17 00:00:00 2001 +From: Pauli <paul.dale@oracle.com> +Date: Fri, 26 Oct 2018 10:54:58 +1000 +Subject: [PATCH] Timing vulnerability in ECDSA signature generation + (CVE-2018-0735) + +Preallocate an extra limb for some of the big numbers to avoid a reallocation +that can potentially provide a side channel. + +Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> +(Merged from https://github.com/openssl/openssl/pull/7486) + +(cherry picked from commit 99540ec79491f59ed8b46b4edf130e17dc907f52) +--- + crypto/ec/ec_mult.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/crypto/ec/ec_mult.c b/crypto/ec/ec_mult.c +index 22bb30ffa1..ff882cce20 100644 +--- a/crypto/ec/ec_mult.c ++++ b/crypto/ec/ec_mult.c +@@ -177,8 +177,8 @@ static int ec_mul_consttime(const EC_GROUP *group, EC_POINT *r, + */ + cardinality_bits = BN_num_bits(cardinality); + group_top = bn_get_top(cardinality); +- if ((bn_wexpand(k, group_top + 1) == NULL) +- || (bn_wexpand(lambda, group_top + 1) == NULL)) ++ if ((bn_wexpand(k, group_top + 2) == NULL) ++ || (bn_wexpand(lambda, group_top + 2) == NULL)) + goto err; + + if (!BN_copy(k, scalar)) +@@ -205,7 +205,7 @@ static int ec_mul_consttime(const EC_GROUP *group, EC_POINT *r, + * k := scalar + 2*cardinality + */ + kbit = BN_is_bit_set(lambda, cardinality_bits); +- BN_consttime_swap(kbit, k, lambda, group_top + 1); ++ BN_consttime_swap(kbit, k, lambda, group_top + 2); + + group_top = bn_get_top(group->field); + if ((bn_wexpand(s->X, group_top) == NULL) +-- +2.19.1 + diff --git a/dev-libs/openssl/files/openssl-1.1.1-CVE-2018-0735.patch b/dev-libs/openssl/files/openssl-1.1.1-CVE-2018-0735.patch new file mode 100644 index 000000000000..295f5dbe8d82 --- /dev/null +++ b/dev-libs/openssl/files/openssl-1.1.1-CVE-2018-0735.patch @@ -0,0 +1,44 @@ +From b1d6d55ece1c26fa2829e2b819b038d7b6d692b4 Mon Sep 17 00:00:00 2001 +From: Pauli <paul.dale@oracle.com> +Date: Fri, 26 Oct 2018 10:54:58 +1000 +Subject: [PATCH] Timing vulnerability in ECDSA signature generation + (CVE-2018-0735) + +Preallocate an extra limb for some of the big numbers to avoid a reallocation +that can potentially provide a side channel. + +Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> +(Merged from https://github.com/openssl/openssl/pull/7486) + +(cherry picked from commit 99540ec79491f59ed8b46b4edf130e17dc907f52) +--- + crypto/ec/ec_mult.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/crypto/ec/ec_mult.c b/crypto/ec/ec_mult.c +index 7e1b3650e7..0e0a5e1394 100644 +--- a/crypto/ec/ec_mult.c ++++ b/crypto/ec/ec_mult.c +@@ -206,8 +206,8 @@ int ec_scalar_mul_ladder(const EC_GROUP *group, EC_POINT *r, + */ + cardinality_bits = BN_num_bits(cardinality); + group_top = bn_get_top(cardinality); +- if ((bn_wexpand(k, group_top + 1) == NULL) +- || (bn_wexpand(lambda, group_top + 1) == NULL)) { ++ if ((bn_wexpand(k, group_top + 2) == NULL) ++ || (bn_wexpand(lambda, group_top + 2) == NULL)) { + ECerr(EC_F_EC_SCALAR_MUL_LADDER, ERR_R_BN_LIB); + goto err; + } +@@ -244,7 +244,7 @@ int ec_scalar_mul_ladder(const EC_GROUP *group, EC_POINT *r, + * k := scalar + 2*cardinality + */ + kbit = BN_is_bit_set(lambda, cardinality_bits); +- BN_consttime_swap(kbit, k, lambda, group_top + 1); ++ BN_consttime_swap(kbit, k, lambda, group_top + 2); + + group_top = bn_get_top(group->field); + if ((bn_wexpand(s->X, group_top) == NULL) +-- +2.19.1 + diff --git a/dev-libs/openssl/openssl-1.1.0i.ebuild b/dev-libs/openssl/openssl-1.1.0i-r1.ebuild index f97d4157d7e4..4cc9eb656d0e 100644 --- a/dev-libs/openssl/openssl-1.1.0i.ebuild +++ b/dev-libs/openssl/openssl-1.1.0i-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="6" @@ -56,6 +56,7 @@ MULTILIB_WRAPPED_HEADERS=( PATCHES=( "${FILESDIR}"/${PN}-1.0.2a-x32-asm.patch #542618 + "${FILESDIR}"/${P}-CVE-2018-0735.patch ) src_prepare() { @@ -98,7 +99,7 @@ src_prepare() { -e $(has noman FEATURES \ && echo '/^install:/s:install_docs::' \ || echo '/^MANDIR=/s:=.*:='${EPREFIX}'/usr/share/man:') \ - -e "/^DOCDIR/s@\$(BASENAME)@&-${PF}@" \ + -e "/^DOCDIR/s@\$(BASENAME)@&-${PVR}@" \ Configurations/unix-Makefile.tmpl \ || die diff --git a/dev-libs/openssl/openssl-1.1.1.ebuild b/dev-libs/openssl/openssl-1.1.1-r1.ebuild index 3b7cd3fc0197..01dfbd3ec61f 100644 --- a/dev-libs/openssl/openssl-1.1.1.ebuild +++ b/dev-libs/openssl/openssl-1.1.1-r1.ebuild @@ -34,6 +34,10 @@ MULTILIB_WRAPPED_HEADERS=( usr/include/openssl/opensslconf.h ) +PATCHES=( + "${FILESDIR}"/${P}-CVE-2018-0735.patch +) + src_prepare() { # keep this in sync with app-misc/c_rehash SSL_CNF_DIR="/etc/ssl" |