summaryrefslogtreecommitdiffstats
path: root/recipes-connectivity/openssl/openssl/CVE-2018-0737-ensure-BN_mod_inverse-and-BN_mod_exp_mont-both-get-called.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-connectivity/openssl/openssl/CVE-2018-0737-ensure-BN_mod_inverse-and-BN_mod_exp_mont-both-get-called.patch')
-rw-r--r--recipes-connectivity/openssl/openssl/CVE-2018-0737-ensure-BN_mod_inverse-and-BN_mod_exp_mont-both-get-called.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/recipes-connectivity/openssl/openssl/CVE-2018-0737-ensure-BN_mod_inverse-and-BN_mod_exp_mont-both-get-called.patch b/recipes-connectivity/openssl/openssl/CVE-2018-0737-ensure-BN_mod_inverse-and-BN_mod_exp_mont-both-get-called.patch
new file mode 100644
index 0000000..aa92d75
--- /dev/null
+++ b/recipes-connectivity/openssl/openssl/CVE-2018-0737-ensure-BN_mod_inverse-and-BN_mod_exp_mont-both-get-called.patch
@@ -0,0 +1,36 @@
1From 337da9779c4ef107a4b7bbaaa198824a489a10ed Mon Sep 17 00:00:00 2001
2From: Andreas Wellving <andreas.wellving@enea.com>
3Date: Mon, 22 Oct 2018 12:43:16 +0200
4Subject: RSA key generation: ensure BN_mod_inverse and BN_mod_exp_mont both get called with...
5X-Git-Tag: OpenSSL_1_0_2p~87
6X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=349a41da1ad88ad87825414752a8ff5fdd6a6c3f
7
8RSA key generation: ensure BN_mod_inverse and BN_mod_exp_mont both get called with BN_FLG_CONSTTIME flag set.
9
10CVE-2018-0737
11
12Reviewed-by: Rich Salz <rsalz@openssl.org>
13Reviewed-by: Matt Caswell <matt@openssl.org>
14(cherry picked from commit 6939eab03a6e23d2bd2c3f5e34fe1d48e542e787)
15
16CVE: CVE-2018-0737
17Upstream-Status: Backport [https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=349a41da1ad88ad87825414752a8ff5fdd6a6c3f]
18
19Signed-off-by: Andreas Wellving <andreas.wellving@enea.com>
20---
21 crypto/rsa/rsa_gen.c | 2 ++
22 1 file changed, 2 insertions(+)
23
24diff --git a/crypto/rsa/rsa_gen.c b/crypto/rsa/rsa_gen.c
25index a85493d..f5914c0 100644
26--- a/crypto/rsa/rsa_gen.c
27+++ b/crypto/rsa/rsa_gen.c
28@@ -155,6 +155,8 @@ static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value,
29 if (BN_copy(rsa->e, e_value) == NULL)
30 goto err;
31
32+ BN_set_flags(rsa->p, BN_FLG_CONSTTIME);
33+ BN_set_flags(rsa->q, BN_FLG_CONSTTIME);
34 /* generate p and q */
35 for (;;) {
36 if (!BN_generate_prime_ex(rsa->p, bitsp, 0, NULL, NULL, cb))