[openssl-commits] [openssl] master update

Matt Caswell matt at openssl.org
Thu Dec 13 10:03:03 UTC 2018


The branch master has been updated
       via  55833a8de70589a5000044b6291e190f5a3826ae (commit)
      from  4fea7005c3d08ed0d575bdea5082b7b0ce355237 (commit)


- Log -----------------------------------------------------------------
commit 55833a8de70589a5000044b6291e190f5a3826ae
Author: Mansour Ahmadi <m.ahmadi at northeastern.edu>
Date:   Tue Dec 11 15:48:08 2018 -0500

    add missing check for BN_mod_inverse
    
    Fixes #7650
    
    Reviewed-by: Kurt Roeckx <kurt at roeckx.be>
    Reviewed-by: Matt Caswell <matt at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/7876)

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

Summary of changes:
 crypto/rsa/rsa_x931g.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/crypto/rsa/rsa_x931g.c b/crypto/rsa/rsa_x931g.c
index bc03875..1601777 100644
--- a/crypto/rsa/rsa_x931g.c
+++ b/crypto/rsa/rsa_x931g.c
@@ -128,6 +128,8 @@ int RSA_X931_derive_ex(RSA *rsa, BIGNUM *p1, BIGNUM *p2, BIGNUM *q1,
 
     /* calculate inverse of q mod p */
     rsa->iqmp = BN_mod_inverse(NULL, rsa->q, rsa->p, ctx2);
+    if (rsa->iqmp == NULL)
+        goto err;
 
     ret = 1;
  err:


More information about the openssl-commits mailing list