[openssl] master update

Dr. Paul Dale pauli at openssl.org
Sat Jun 26 01:41:05 UTC 2021


The branch master has been updated
       via  89fe295257f374647122f73776ddb34555c543f0 (commit)
      from  15500c9d08dc51e67b5afb7de058258e244fe7f9 (commit)


- Log -----------------------------------------------------------------
commit 89fe295257f374647122f73776ddb34555c543f0
Author: Christian Heimes <christian at python.org>
Date:   Thu Jun 24 17:47:30 2021 +0200

    Fix segfault in openssl x509 -modulus
    
    The command ``openssl x509 -noout -modulus -in cert.pem`` used to segfaults
    sometimes because an uninitialized variable was passed to
    ``BN_lebin2bn``. The bug triggered an assertion in bn_expand_internal().
    
    Fixes: https://github.com/openssl/openssl/issues/15899
    Signed-off-by: Christian Heimes <christian at python.org>
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    Reviewed-by: Dmitry Belyavskiy <beldmit at gmail.com>
    Reviewed-by: Paul Dale <pauli at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/15900)

-----------------------------------------------------------------------

Summary of changes:
 apps/x509.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/apps/x509.c b/apps/x509.c
index b68530fb22..e9a45e4d8f 100644
--- a/apps/x509.c
+++ b/apps/x509.c
@@ -943,7 +943,7 @@ int x509_main(int argc, char **argv)
         } else if (i == modulus) {
             BIO_printf(out, "Modulus=");
             if (EVP_PKEY_is_a(pkey, "RSA")) {
-                BIGNUM *n;
+                BIGNUM *n = NULL;
 
                 /* Every RSA key has an 'n' */
                 EVP_PKEY_get_bn_param(pkey, "n", &n);


More information about the openssl-commits mailing list