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

bernd.edlinger at hotmail.de bernd.edlinger at hotmail.de
Fri Feb 23 13:12:49 UTC 2018


The branch OpenSSL_1_1_0-stable has been updated
       via  89314d9a22ad0b0ce87e188c486532926aff01ea (commit)
      from  15f90bc60a11ec6b5fe42f9fb155715a64e4ab10 (commit)


- Log -----------------------------------------------------------------
commit 89314d9a22ad0b0ce87e188c486532926aff01ea
Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
Date:   Wed Feb 21 15:48:02 2018 +0100

    Fix some bugs with the cfb1 bitsize handling
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/5426)
    
    (cherry picked from commit 604e591ed75eff9296c21ee5fe93f3e9ec246094)

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

Summary of changes:
 crypto/evp/e_aes.c                | 2 ++
 crypto/evp/e_camellia.c           | 4 +++-
 crypto/include/internal/evp_int.h | 2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/crypto/evp/e_aes.c b/crypto/evp/e_aes.c
index fe52213..b17154d 100644
--- a/crypto/evp/e_aes.c
+++ b/crypto/evp/e_aes.c
@@ -1229,6 +1229,8 @@ static int aes_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
                                 EVP_CIPHER_CTX_encrypting(ctx), dat->block);
         EVP_CIPHER_CTX_set_num(ctx, num);
         len -= MAXBITCHUNK;
+        out += MAXBITCHUNK;
+        in  += MAXBITCHUNK;
     }
     if (len) {
         int num = EVP_CIPHER_CTX_num(ctx);
diff --git a/crypto/evp/e_camellia.c b/crypto/evp/e_camellia.c
index b50fa0b..905d7a6 100644
--- a/crypto/evp/e_camellia.c
+++ b/crypto/evp/e_camellia.c
@@ -325,8 +325,10 @@ static int camellia_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
         int num = EVP_CIPHER_CTX_num(ctx);
         CRYPTO_cfb128_1_encrypt(in, out, MAXBITCHUNK * 8, &dat->ks,
                                 EVP_CIPHER_CTX_iv_noconst(ctx), &num, EVP_CIPHER_CTX_encrypting(ctx), dat->block);
-        len -= MAXBITCHUNK;
         EVP_CIPHER_CTX_set_num(ctx, num);
+        len -= MAXBITCHUNK;
+        out += MAXBITCHUNK;
+        in  += MAXBITCHUNK;
     }
     if (len) {
         int num = EVP_CIPHER_CTX_num(ctx);
diff --git a/crypto/include/internal/evp_int.h b/crypto/include/internal/evp_int.h
index 6cc2f92..358d720 100644
--- a/crypto/include/internal/evp_int.h
+++ b/crypto/include/internal/evp_int.h
@@ -199,7 +199,7 @@ static int cname##_cfb##cbits##_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
         cprefix##_cfb##cbits##_encrypt(in, out, (long) \
             ((cbits == 1) \
                 && !EVP_CIPHER_CTX_test_flags(ctx, EVP_CIPH_FLAG_LENGTH_BITS) \
-                ? inl*8 : inl), \
+                ? chunk*8 : chunk), \
             &EVP_C_DATA(kstruct, ctx)->ksched, EVP_CIPHER_CTX_iv_noconst(ctx),\
             &num, EVP_CIPHER_CTX_encrypting(ctx));\
         EVP_CIPHER_CTX_set_num(ctx, num);\


More information about the openssl-commits mailing list