diff options
author | Rich Salz <rsalz@openssl.org> | 2017-04-24 17:19:56 +0200 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-04-24 17:19:56 +0200 |
commit | a68d35057ba2676bc9b9a16f4952791eef4b9905 (patch) | |
tree | cee147a6cb868831059255f154b43ae24c3859b7 /engines/e_dasync.c | |
parent | Don't fail the connection in SSLv3 if server selects ECDHE (diff) | |
download | openssl-a68d35057ba2676bc9b9a16f4952791eef4b9905.tar.xz openssl-a68d35057ba2676bc9b9a16f4952791eef4b9905.zip |
check length sanity before correcting in EVP_CTRL_AEAD_TLS1_AAD
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3289)
Diffstat (limited to 'engines/e_dasync.c')
-rw-r--r-- | engines/e_dasync.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/e_dasync.c b/engines/e_dasync.c index 89b12775b1..4e3e9369fc 100644 --- a/engines/e_dasync.c +++ b/engines/e_dasync.c @@ -606,6 +606,8 @@ static int dasync_cipher_ctrl_helper(EVP_CIPHER_CTX *ctx, int type, int arg, if (pipe_ctx->enc) { if ((p[arg - 4] << 8 | p[arg - 3]) >= TLS1_1_VERSION) { + if (len < AES_BLOCK_SIZE) + return 0; len -= AES_BLOCK_SIZE; } |