diff -urpN zl_p1/CHANGES zl_p2/CHANGES --- zl_p1/CHANGES 2025-08-06 14:52:13.741941258 +0200 +++ zl_p2/CHANGES 2025-08-06 15:40:21.437192519 +0200 @@ -7,7 +7,21 @@ https://github.com/openssl/openssl/commits/ and pick the appropriate release branch. - Changes between 1.1.1za and 1.1.1zb [16 Oct 2024] + Changes between 1.1.1za and 1.1.1zb [20 Jan 2025] + + *) Fix timing side-channel in ECDSA signature computation + + There is a timing signal of around 300 nanoseconds when the top word of + the inverted ECDSA nonce value is zero. This can happen with significant + probability only for some of the supported elliptic curves. In particular + the NIST P-521 curve is affected. To be able to measure this leak, the + attacker process must either be located in the same physical computer or + must have a very fast network connection with low latency. + + Attacks on ECDSA nonce are also known as Minerva attack. + + [CVE-2024-13176] + [Tomas Mraz] *) Harden BN_GF2m_poly2arr against misuse diff -urpN zl_p1/NEWS zl_p2/NEWS --- zl_p1/NEWS 2025-08-06 15:29:09.275399728 +0200 +++ zl_p2/NEWS 2025-08-06 15:40:47.540621856 +0200 @@ -5,8 +5,10 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. - Major changes between OpenSSL 1.0.2zk and OpenSSL 1.0.2zl [16 Oct 2024] + Major changes between OpenSSL 1.0.2zk and OpenSSL 1.0.2zl [20 Jan 2024] + o Fix version number for versions that require two letters + o Fix timing side-channel in ECDSA signature computation o Harden BN_GF2m_poly2arr against misuse Major changes between OpenSSL 1.0.2zj and OpenSSL 1.0.2zk [26 Jun 2024] diff -urpN zl_p1/README zl_p2/README --- zl_p1/README 2025-08-06 15:29:34.400167630 +0200 +++ zl_p2/README 2025-08-06 15:41:03.383273309 +0200 @@ -1,5 +1,5 @@ - OpenSSL 1.0.2zl-sec 16 Oct 2024 + OpenSSL 1.0.2zl-sec 20 Jan 2024 Copyright (c) 1998-2023 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson diff -urpN zl_p1/crypto/bn/bn_exp.c zl_p2/crypto/bn/bn_exp.c --- zl_p1/crypto/bn/bn_exp.c 2023-11-06 11:20:03.000000000 +0100 +++ zl_p2/crypto/bn/bn_exp.c 2025-08-06 15:57:53.213555664 +0200 @@ -700,7 +700,7 @@ static int MOD_EXP_CTIME_COPY_FROM_PREBU * out by Colin Percival, * http://www.daemonology.net/hyperthreading-considered-harmful/) */ -int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, +int bn_mod_exp_mont_fixed_top(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont) { @@ -717,10 +717,6 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr unsigned int t4 = 0; #endif - bn_check_top(a); - bn_check_top(p); - bn_check_top(m); - if (!BN_is_odd(m)) { BNerr(BN_F_BN_MOD_EXP_MONT_CONSTTIME, BN_R_CALLED_WITH_EVEN_MODULUS); return (0); @@ -1192,7 +1188,7 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr goto err; } else #endif - if (!BN_from_montgomery(rr, &tmp, mont, ctx)) + if (!bn_from_mont_fixed_top(rr, &tmp, mont, ctx)) goto err; ret = 1; err: @@ -1207,6 +1203,19 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr return (ret); } +int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, + const BIGNUM *m, BN_CTX *ctx, + BN_MONT_CTX *in_mont) +{ + bn_check_top(a); + bn_check_top(p); + bn_check_top(m); + if (!bn_mod_exp_mont_fixed_top(rr, a, p, m, ctx, in_mont)) + return 0; + bn_correct_top(rr); + return 1; +} + int BN_mod_exp_mont_word(BIGNUM *rr, BN_ULONG a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont) { diff -urpN zl_p1/crypto/opensslv.h zl_p2/crypto/opensslv.h --- zl_p1/crypto/opensslv.h 2025-08-06 15:34:13.642682449 +0200 +++ zl_p2/crypto/opensslv.h 2025-08-06 15:41:36.751533878 +0200 @@ -32,9 +32,9 @@ extern "C" { */ # define OPENSSL_VERSION_NUMBER 0x1000225fL # ifdef OPENSSL_FIPS -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2zl-fips-sec 16 Oct 2024" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2zl-fips-sec 20 Jan 2024" # else -# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2zl-sec 16 Oct 2024" +# define OPENSSL_VERSION_TEXT "OpenSSL 1.0.2zl-sec 20 Jan 2024" # endif # define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT