[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openssl-cvs
Subject:    [openssl]  master update
From:       Dr. Paul Dale <pauli () openssl ! org>
Date:       2021-12-23 1:53:07
Message-ID: 1640224387.701144.3002735.nullmailer () dev ! openssl ! org
[Download RAW message or body]

The branch master has been updated
       via  7c78bd4be810ddceb8f13585a921946cc98f5fbd (commit)
      from  a595e3286ae9f033c56452967b3add2145f9085f (commit)


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

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

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

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);
     }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic