From 7d56a74a96828985db7354a55227a511615f732b Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Fri, 15 Apr 2022 10:22:59 +0100 Subject: Fix the RC4-MD5 cipher A copy&paste error meant that the RC4-MD5 cipher (used in TLS) used the TLS AAD data as the MAC key. CVE-2022-1434 Fixes #18112 Reviewed-by: Tomas Mraz Reviewed-by: Shane Lontis Reviewed-by: Matt Caswell --- providers/implementations/ciphers/cipher_rc4_hmac_md5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'providers/implementations') diff --git a/providers/implementations/ciphers/cipher_rc4_hmac_md5.c b/providers/implementations/ciphers/cipher_rc4_hmac_md5.c index b915122a39..fc11c80a86 100644 --- a/providers/implementations/ciphers/cipher_rc4_hmac_md5.c +++ b/providers/implementations/ciphers/cipher_rc4_hmac_md5.c @@ -183,7 +183,7 @@ static int rc4_hmac_md5_set_ctx_params(void *vctx, const OSSL_PARAM params[]) } ctx->tls_aad_pad_sz = sz; } - p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_AEAD_TLS1_AAD); + p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_AEAD_MAC_KEY); if (p != NULL) { if (p->data_type != OSSL_PARAM_OCTET_STRING) { ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_GET_PARAMETER); -- cgit v1.2.3