[openssl] openssl-3.0 update

tomas at openssl.org tomas at openssl.org
Tue Oct 12 14:47:02 UTC 2021


The branch openssl-3.0 has been updated
       via  a7731e5f8bd01d0aed5f262f7815a75269045c32 (commit)
      from  14fd5a0d55652a7539c66df18d1120baed42248e (commit)


- Log -----------------------------------------------------------------
commit a7731e5f8bd01d0aed5f262f7815a75269045c32
Author: Tomas Mraz <tomas at openssl.org>
Date:   Mon Oct 11 15:03:47 2021 +0200

    ctrl_params_translate: Fix leak of BN_CTX
    
    Also add a missing allocation failure check.
    
    Fixes #16788
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    Reviewed-by: Bernd Edlinger <bernd.edlinger at hotmail.de>
    (Merged from https://github.com/openssl/openssl/pull/16804)
    
    (cherry picked from commit 922422119df1f6aabd2a15e6e4108d98b6143adf)

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

Summary of changes:
 crypto/evp/ctrl_params_translate.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/crypto/evp/ctrl_params_translate.c b/crypto/evp/ctrl_params_translate.c
index 88945e13e6..b17ce3cbf9 100644
--- a/crypto/evp/ctrl_params_translate.c
+++ b/crypto/evp/ctrl_params_translate.c
@@ -1595,10 +1595,13 @@ static int get_payload_public_key(enum state state,
             const EC_GROUP *ecg = EC_KEY_get0_group(eckey);
             const EC_POINT *point = EC_KEY_get0_public_key(eckey);
 
+            if (bnctx == NULL)
+                return 0;
             ctx->sz = EC_POINT_point2buf(ecg, point,
                                          POINT_CONVERSION_COMPRESSED,
                                          &buf, bnctx);
             ctx->p2 = buf;
+            BN_CTX_free(bnctx);
             break;
         }
         return 0;


More information about the openssl-commits mailing list