[openssl] master update

shane.lontis at oracle.com shane.lontis at oracle.com
Mon Aug 26 06:37:26 UTC 2019


The branch master has been updated
       via  37a830e729f56cfc7b893f321880ac52f1b35cdb (commit)
      from  f3b8d77f99c84e39c48599ad54366e806f3b9478 (commit)


- Log -----------------------------------------------------------------
commit 37a830e729f56cfc7b893f321880ac52f1b35cdb
Author: Shane Lontis <shane.lontis at oracle.com>
Date:   Sun Aug 25 17:10:48 2019 +1000

    Fix Issue OSS-Fuzz: Branch on uninitialized memory (in ccm code).
    
    This would also happen for aes-ccm. There was one branch path where it just returned 1
    without setting *padlen, It now branches so that the value is set to 0.
    
    Fixes #9691
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    Reviewed-by: Bernd Edlinger <bernd.edlinger at hotmail.de>
    (Merged from https://github.com/openssl/openssl/pull/9692)

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

Summary of changes:
 providers/common/ciphers/cipher_ccm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/providers/common/ciphers/cipher_ccm.c b/providers/common/ciphers/cipher_ccm.c
index 980c815aa1..fcfef73197 100644
--- a/providers/common/ciphers/cipher_ccm.c
+++ b/providers/common/ciphers/cipher_ccm.c
@@ -349,7 +349,7 @@ static int ccm_cipher_internal(PROV_CCM_CTX *ctx, unsigned char *out,
 
     /* EVP_*Final() doesn't return any data */
     if (in == NULL && out != NULL)
-        return 1;
+        goto finish;
 
     if (!ctx->iv_set)
         goto err;
@@ -388,6 +388,7 @@ static int ccm_cipher_internal(PROV_CCM_CTX *ctx, unsigned char *out,
         }
     }
     olen = len;
+finish:
     rv = 1;
 err:
     *padlen = olen;


More information about the openssl-commits mailing list