]> 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>
Wed, 13 Nov 2024 16:12:23 +0000 (17:12 +0100)
commit8d723690b0863cafcbae206acf48f9a8d3115fd0
tree803fae963d60050f2078c7fded4723e1049f0f04
parentff473606bbb74e7d391e555fc7168add8f70d9cd
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: Hugo Landau <hlandau@devever.net>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22044)
crypto/cms/cms_asn1.c
crypto/cms/cms_env.c
crypto/cms/cms_lib.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