openssl/crypto/evp
Pauli f3a7e6c057 evp: process key length and iv length early if present
evp_cipher_init_internal() takes a params array argument and this is processed
late in the initialisation process for some ciphers (AEAD ones).

This means that changing the IV length as a parameter will either truncate the
IV (very bad if SP 800-38d section 8.2.1 is used) or grab extra uninitialised
bytes.

Truncation is very bad if SP 800-38d section 8.2.1 is being used to
contruct a deterministic IV.  This leads to an instant loss of confidentiality.

Grabbing extra bytes isn't so serious, it will most likely result in a bad
decryption.

Problem reported by Tony Battersby of Cybernetics.com but earlier discovered
and raised as issue #19822.

Fixes CVE-2023-5363
Fixes #19822

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
2023-10-24 14:32:24 +01:00
..
asymcipher.c Copyright year updates 2023-09-07 09:59:15 +01:00
bio_b64.c Copyright year updates 2023-09-07 09:59:15 +01:00
bio_enc.c Copyright year updates 2023-09-07 09:59:15 +01:00
bio_md.c
bio_ok.c Copyright year updates 2023-09-07 09:59:15 +01:00
build.info
c_allc.c
c_alld.c
cmeth_lib.c Copyright year updates 2023-09-07 09:59:15 +01:00
ctrl_params_translate.c Copyright year updates 2023-09-07 09:59:15 +01:00
dh_ctrl.c
dh_support.c
digest.c Copyright year updates 2023-09-07 09:59:15 +01:00
dsa_ctrl.c
e_aes_cbc_hmac_sha1.c
e_aes_cbc_hmac_sha256.c
e_aes.c
e_aria.c
e_bf.c
e_camellia.c
e_cast.c
e_chacha20_poly1305.c Copyright year updates 2023-09-28 14:23:29 +01:00
e_des3.c
e_des.c
e_idea.c
e_null.c
e_old.c
e_rc2.c
e_rc4_hmac_md5.c
e_rc4.c
e_rc5.c
e_seed.c
e_sm4.c
e_xcbc_d.c
ec_ctrl.c Copyright year updates 2023-09-07 09:59:15 +01:00
ec_support.c
encode.c
evp_cnf.c
evp_enc.c evp: process key length and iv length early if present 2023-10-24 14:32:24 +01:00
evp_err.c
evp_fetch.c Copyright year updates 2023-09-07 09:59:15 +01:00
evp_key.c
evp_lib.c Copyright year updates 2023-09-07 09:59:15 +01:00
evp_local.h Copyright year updates 2023-09-07 09:59:15 +01:00
evp_pbe.c Copyright year updates 2023-09-07 09:59:15 +01:00
evp_pkey.c Copyright year updates 2023-09-07 09:59:15 +01:00
evp_rand.c rand: fix seeding from a weak entropy source 2023-10-24 11:14:11 +01:00
evp_utils.c
exchange.c Copyright year updates 2023-09-07 09:59:15 +01:00
kdf_lib.c
kdf_meth.c Copyright year updates 2023-09-07 09:59:15 +01:00
kem.c Copyright year updates 2023-09-07 09:59:15 +01:00
keymgmt_lib.c Copyright year updates 2023-09-07 09:59:15 +01:00
keymgmt_meth.c Copyright year updates 2023-09-07 09:59:15 +01:00
legacy_blake2.c Copyright year updates 2023-09-28 14:23:29 +01:00
legacy_md2.c
legacy_md4.c
legacy_md5_sha1.c
legacy_md5.c
legacy_mdc2.c
legacy_meth.h
legacy_ripemd.c
legacy_sha.c EVP shake_ctrl(): add missing NULL evp_ctx check 2023-10-17 22:02:29 +02:00
legacy_wp.c
m_null.c
m_sigver.c Copyright year updates 2023-09-07 09:59:15 +01:00
mac_lib.c
mac_meth.c Copyright year updates 2023-09-07 09:59:15 +01:00
names.c
p5_crpt2.c Copyright year updates 2023-09-07 09:59:15 +01:00
p5_crpt.c
p_dec.c
p_enc.c
p_legacy.c
p_lib.c Restore the meaning of EVP_PKEY_print_private() 2023-10-04 08:10:55 +02:00
p_open.c
p_seal.c
p_sign.c Copyright year updates 2023-09-07 09:59:15 +01:00
p_verify.c Copyright year updates 2023-09-07 09:59:15 +01:00
pbe_scrypt.c
pmeth_check.c
pmeth_gn.c Copyright year updates 2023-09-28 14:23:29 +01:00
pmeth_lib.c no-engine: fix signing with legacy app method based keys 2023-09-22 15:07:49 -04:00
signature.c Copyright year updates 2023-09-07 09:59:15 +01:00