[openssl-commits] [openssl] OpenSSL_1_1_0-stable update

paul.dale at oracle.com paul.dale at oracle.com
Tue Jul 31 04:51:15 UTC 2018


The branch OpenSSL_1_1_0-stable has been updated
       via  c0cc23af26d0363dbd164ceae97ed044e3fd8861 (commit)
      from  35fa31cc9d480dcd5108d17ccf8dc576bee20f09 (commit)


- Log -----------------------------------------------------------------
commit c0cc23af26d0363dbd164ceae97ed044e3fd8861
Author: Pauli <paul.dale at oracle.com>
Date:   Tue Jul 31 13:11:00 2018 +1000

    Check return from BN_sub
    
    Reviewed-by: Tim Hudson <tjh at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/6823)
    
    (cherry picked from commit 3d3cbce550ff5d6172cf28dbbf80bda93f6577a9)

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

Summary of changes:
 crypto/rsa/rsa_ossl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/crypto/rsa/rsa_ossl.c b/crypto/rsa/rsa_ossl.c
index 41fafa7..8e81cbb 100644
--- a/crypto/rsa/rsa_ossl.c
+++ b/crypto/rsa/rsa_ossl.c
@@ -332,7 +332,8 @@ static int rsa_ossl_private_encrypt(int flen, const unsigned char *from,
             goto err;
 
     if (padding == RSA_X931_PADDING) {
-        BN_sub(f, rsa->n, ret);
+        if (!BN_sub(f, rsa->n, ret))
+            goto err;
         if (BN_cmp(ret, f) > 0)
             res = f;
         else


More information about the openssl-commits mailing list