From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BA57C138334 for ; Mon, 29 Oct 2018 13:08:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 763EFE089E; Mon, 29 Oct 2018 13:08:32 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3716BE089E for ; Mon, 29 Oct 2018 13:08:31 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 85A8D335CD2 for ; Mon, 29 Oct 2018 13:08:29 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6C41142A for ; Mon, 29 Oct 2018 13:08:27 +0000 (UTC) From: "Lars Wendler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Lars Wendler" Message-ID: <1540818500.9cf9aa64d52743263e9619c3cd0794557e3b5445.polynomial-c@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/openssl/files/, dev-libs/openssl/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/openssl/files/openssl-1.1.0i-CVE-2018-0735.patch dev-libs/openssl/files/openssl-1.1.1-CVE-2018-0735.patch dev-libs/openssl/openssl-1.1.0i-r1.ebuild dev-libs/openssl/openssl-1.1.0i.ebuild dev-libs/openssl/openssl-1.1.1-r1.ebuild dev-libs/openssl/openssl-1.1.1.ebuild X-VCS-Directories: dev-libs/openssl/ dev-libs/openssl/files/ X-VCS-Committer: polynomial-c X-VCS-Committer-Name: Lars Wendler X-VCS-Revision: 9cf9aa64d52743263e9619c3cd0794557e3b5445 X-VCS-Branch: master Date: Mon, 29 Oct 2018 13:08:27 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: f73a2141-44a9-4886-8ca5-ddb5c7a60830 X-Archives-Hash: bc53caff06b5d3b419b118dfeaab1aac commit: 9cf9aa64d52743263e9619c3cd0794557e3b5445 Author: Lars Wendler gentoo org> AuthorDate: Mon Oct 29 13:02:33 2018 +0000 Commit: Lars Wendler gentoo org> CommitDate: Mon Oct 29 13:08:20 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9cf9aa64 dev-libs/openssl: Revbumps to fix CVE-2018-0735 Signed-off-by: Lars Wendler gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11 .../files/openssl-1.1.0i-CVE-2018-0735.patch | 44 ++++++++++++++++++++++ .../files/openssl-1.1.1-CVE-2018-0735.patch | 44 ++++++++++++++++++++++ ...nssl-1.1.0i.ebuild => openssl-1.1.0i-r1.ebuild} | 5 ++- ...penssl-1.1.1.ebuild => openssl-1.1.1-r1.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 00000000000..5762c04fa34 --- /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 +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 +(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 00000000000..295f5dbe8d8 --- /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 +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 +(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 similarity index 98% rename from dev-libs/openssl/openssl-1.1.0i.ebuild rename to dev-libs/openssl/openssl-1.1.0i-r1.ebuild index f97d4157d7e..4cc9eb656d0 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 similarity index 99% rename from dev-libs/openssl/openssl-1.1.1.ebuild rename to dev-libs/openssl/openssl-1.1.1-r1.ebuild index 3b7cd3fc019..01dfbd3ec61 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"