[openssl] openssl-3.0 update

Dr. Paul Dale pauli at openssl.org
Thu Dec 23 01:53:38 UTC 2021


The branch openssl-3.0 has been updated
       via  a9c02a552153eabfb5a1a01ecdeb03e7b2920f4b (commit)
      from  317bedd656e76b1162a6b29ed19a78303f362a78 (commit)


- Log -----------------------------------------------------------------
commit a9c02a552153eabfb5a1a01ecdeb03e7b2920f4b
Author: Kan <chenxinpingc2306 at 163.com>
Date:   Fri Dec 17 00:35:32 2021 +0800

    Add static check in BN_hex2bn
    
    Fixes #17298
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    Reviewed-by: Paul Dale <pauli at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/17299)
    
    (cherry picked from commit 7c78bd4be810ddceb8f13585a921946cc98f5fbd)

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

Summary of changes:
 crypto/bn/bn_conv.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/crypto/bn/bn_conv.c b/crypto/bn/bn_conv.c
index 6757f3d0aa..75054f5d6a 100644
--- a/crypto/bn/bn_conv.c
+++ b/crypto/bn/bn_conv.c
@@ -154,6 +154,10 @@ int BN_hex2bn(BIGNUM **bn, const char *a)
             return 0;
     } else {
         ret = *bn;
+        if (BN_get_flags(ret, BN_FLG_STATIC_DATA)) {
+            ERR_raise(ERR_LIB_BN, ERR_R_PASSED_INVALID_ARGUMENT);
+            return 0;
+        }
         BN_zero(ret);
     }
 


More information about the openssl-commits mailing list