From: Dmitry Belyavskiy Date: Mon, 14 Jun 2021 12:30:48 +0000 (+0200) Subject: Correct processing of AES-SHA stitched ciphers X-Git-Tag: openssl-3.0.0-beta1~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f763e1351446da952c54e0ea85ec26a436cf4815;p=thirdparty%2Fopenssl.git Correct processing of AES-SHA stitched ciphers Fixes: #15706 Reviewed-by: Tomas Mraz Reviewed-by: Shane Lontis Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/15740) --- diff --git a/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c b/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c index 14fbf63b033..24349df1596 100644 --- a/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c +++ b/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c @@ -733,7 +733,7 @@ static int aesni_cbc_hmac_sha256_set_tls1_aad(void *vctx, if (len < AES_BLOCK_SIZE) return 0; len -= AES_BLOCK_SIZE; - p[aad_len] = len >> 8; + p[aad_len - 2] = len >> 8; p[aad_len - 1] = len; } sctx->md = sctx->head;