[openssl-commits] [openssl] master update

Viktor Dukhovni viktor at openssl.org
Thu Jan 14 00:59:19 UTC 2016


The branch master has been updated
       via  b098dcae66433efc4c073ca2cc5fc64cdf8a613e (commit)
      from  502e16853367f373ec2aad94f1fd24884c4a7b65 (commit)


- Log -----------------------------------------------------------------
commit b098dcae66433efc4c073ca2cc5fc64cdf8a613e
Author: Viktor Dukhovni <openssl-users at dukhovni.org>
Date:   Wed Jan 13 19:51:17 2016 -0500

    Fix double-free bugs in EC group precomputation state
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

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

Summary of changes:
 crypto/ec/ecp_nistp224.c | 1 +
 crypto/ec/ecp_nistp256.c | 1 +
 crypto/ec/ecp_nistp521.c | 1 +
 crypto/ec/ecp_nistz256.c | 1 +
 4 files changed, 4 insertions(+)

diff --git a/crypto/ec/ecp_nistp224.c b/crypto/ec/ecp_nistp224.c
index c2677a8..a2def18 100644
--- a/crypto/ec/ecp_nistp224.c
+++ b/crypto/ec/ecp_nistp224.c
@@ -1560,6 +1560,7 @@ int ec_GFp_nistp224_precompute_mult(EC_GROUP *group, BN_CTX *ctx)
 
     /* throw away old precomputation */
     EC_nistp224_pre_comp_free(group->pre_comp.nistp224);
+    group->pre_comp.nistp224 = NULL;
     if (ctx == NULL)
         if ((ctx = new_ctx = BN_CTX_new()) == NULL)
             return 0;
diff --git a/crypto/ec/ecp_nistp256.c b/crypto/ec/ecp_nistp256.c
index 26c1693..11bde8a 100644
--- a/crypto/ec/ecp_nistp256.c
+++ b/crypto/ec/ecp_nistp256.c
@@ -2185,6 +2185,7 @@ int ec_GFp_nistp256_precompute_mult(EC_GROUP *group, BN_CTX *ctx)
 
     /* throw away old precomputation */
     EC_nistp256_pre_comp_free(group->pre_comp.nistp256);
+    group->pre_comp.nistp256 = NULL;
     if (ctx == NULL)
         if ((ctx = new_ctx = BN_CTX_new()) == NULL)
             return 0;
diff --git a/crypto/ec/ecp_nistp521.c b/crypto/ec/ecp_nistp521.c
index 516101c..d656517 100644
--- a/crypto/ec/ecp_nistp521.c
+++ b/crypto/ec/ecp_nistp521.c
@@ -2009,6 +2009,7 @@ int ec_GFp_nistp521_precompute_mult(EC_GROUP *group, BN_CTX *ctx)
 
     /* throw away old precomputation */
     EC_nistp521_pre_comp_free(group->pre_comp.nistp521);
+    group->pre_comp.nistp521 = NULL;
     if (ctx == NULL)
         if ((ctx = new_ctx = BN_CTX_new()) == NULL)
             return 0;
diff --git a/crypto/ec/ecp_nistz256.c b/crypto/ec/ecp_nistz256.c
index 16e7929..c25a7da 100644
--- a/crypto/ec/ecp_nistz256.c
+++ b/crypto/ec/ecp_nistz256.c
@@ -770,6 +770,7 @@ __owur static int ecp_nistz256_mult_precompute(EC_GROUP *group, BN_CTX *ctx)
 
     /* if there is an old NISTZ256_PRE_COMP object, throw it away */
     EC_nistz256_pre_comp_free(group->pre_comp.nistz256);
+    group->pre_comp.nistz256 = NULL;
     generator = EC_GROUP_get0_generator(group);
     if (generator == NULL) {
         ECerr(EC_F_ECP_NISTZ256_MULT_PRECOMPUTE, EC_R_UNDEFINED_GENERATOR);


More information about the openssl-commits mailing list