]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix error handling in CMS_EncryptedData_encrypt
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Thu, 7 Sep 2023 16:05:44 +0000 (18:05 +0200)
committerTomas Mraz <tomas@openssl.org>
Mon, 11 Sep 2023 08:22:43 +0000 (10:22 +0200)
commit13dd772f61d149628a768d987828aa6dbc72fb31
tree1805e30f75d1c4b025f64f7728465e80c017d511
parentb13ef5e90a1d9c73f6c548ab5557a939a09744e0
Fix error handling in CMS_EncryptedData_encrypt

That caused several memory leaks in case of error.
Also when the CMS object that is created by CMS_EncryptedData_encrypt
is not used in the normal way, but instead just deleted
by CMS_ContentInfo_free some memory was lost.

Fixes #21985

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22008)
crypto/cms/cms_asn1.c
crypto/cms/cms_local.h
crypto/cms/cms_sd.c
crypto/cms/cms_smime.c
fuzz/corpora/cms/2aba8037213156ea1593054768d4576cb8d08309 [new file with mode: 0644]
fuzz/corpora/cms/2aba8037213156ea1593054768d4576cb8d083ed [new file with mode: 0644]
test/recipes/80-test_cms.t