openssl/crypto/cms
Ryan Hooper 7de825efa2 Fix Memory leak in CMS_EncryptedData_set1_key
When CMS_EncryptedData_set1_key is called repeatedly it will
leak data on the second call. This was because
cms->d.encryptedData was already set and needed to be cleared
before the call to M_ASN1_new_of.

Fixes: #28606

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28668)
2025-10-01 17:48:54 +02:00
..
build.info Implement KEMRecipientInfo (RFC9629) in CMS 2025-07-30 11:39:04 +02:00
cms_asn1.c Implement KEMRecipientInfo (RFC9629) in CMS 2025-07-30 11:39:04 +02:00
cms_att.c Copyright year updates 2024-04-09 13:43:26 +02:00
cms_cd.c Convert ZLIB defines to OPENSSL_NO_ZLIB 2022-10-18 09:30:21 -04:00
cms_dd.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
cms_dh.c Copyright year updates 2025-09-02 13:05:45 +00:00
cms_ec.c Fix multiple wrong checks of EVP_PKEY_set1_encoded_public_key 2024-11-22 12:09:38 +01:00
cms_enc.c Fix Memory leak in CMS_EncryptedData_set1_key 2025-10-01 17:48:54 +02:00
cms_env.c Implement KEMRecipientInfo (RFC9629) in CMS 2025-07-30 11:39:04 +02:00
cms_err.c Implement KEMRecipientInfo (RFC9629) in CMS 2025-07-30 11:39:04 +02:00
cms_ess.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
cms_io.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
cms_kari.c Implement KEMRecipientInfo (RFC9629) in CMS 2025-07-30 11:39:04 +02:00
cms_kem.c crypto\cms\cms_kem.c: Add ASN1_TYPE_free when EVP_CIPHER_param_to_asn1() fails 2025-08-22 11:39:45 -04:00
cms_kemri.c cms_kemri.c: Fix Coverity issues 2025-08-11 16:44:08 +02:00
cms_lib.c Fix use of SHAKE as a digest in CMS 2025-03-20 12:20:37 +01:00
cms_local.h Implement KEMRecipientInfo (RFC9629) in CMS 2025-07-30 11:39:04 +02:00
cms_pwri.c kek_unwrap_key(): Fix incorrect check of unwrapped key size 2025-09-29 11:57:36 +02:00
cms_rsa.c Copyright year updates 2025-09-02 13:05:45 +00:00
cms_sd.c libapps + libcrypto: Silence warnings on Win64 builds 2025-07-02 17:26:26 +02:00
cms_smime.c crypto: use array memory (re)allocation routines 2025-08-08 12:22:10 -04:00