diff options
author | delphij <delphij@FreeBSD.org> | 2017-02-23 07:12:18 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2017-02-23 07:12:18 +0000 |
commit | 8ec5a888ff17420a447fce1d15a0413c122dd297 (patch) | |
tree | 4cefbc53a1b7df7cb45a471b65d3b2be5d57c692 /crypto | |
parent | a820b5878036538de63ff2dcdc3d5c5c5bdfc7fb (diff) | |
download | FreeBSD-src-8ec5a888ff17420a447fce1d15a0413c122dd297.zip FreeBSD-src-8ec5a888ff17420a447fce1d15a0413c122dd297.tar.gz |
Fix OpenSSL RC4_MD5 cipher vulnerability.
Approved by: so
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/openssl/crypto/evp/e_rc4_hmac_md5.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/openssl/crypto/evp/e_rc4_hmac_md5.c b/crypto/openssl/crypto/evp/e_rc4_hmac_md5.c index 2da1117..ca53913 100644 --- a/crypto/openssl/crypto/evp/e_rc4_hmac_md5.c +++ b/crypto/openssl/crypto/evp/e_rc4_hmac_md5.c @@ -267,6 +267,8 @@ static int rc4_hmac_md5_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, len = p[arg - 2] << 8 | p[arg - 1]; if (!ctx->encrypt) { + if (len < MD5_DIGEST_LENGTH) + return -1; len -= MD5_DIGEST_LENGTH; p[arg - 2] = len >> 8; p[arg - 1] = len; |