[openssl/openssl] 13dd77: Fix error handling in CMS_EncryptedData_encrypt

Bernd Edlinger noreply at github.com
Mon Sep 11 08:25:10 UTC 2023


  Branch: refs/heads/OpenSSL_1_1_1-stable
  Home:   https://github.com/openssl/openssl
  Commit: 13dd772f61d149628a768d987828aa6dbc72fb31
      https://github.com/openssl/openssl/commit/13dd772f61d149628a768d987828aa6dbc72fb31
  Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
  Date:   2023-09-11 (Mon, 11 Sep 2023)

  Changed paths:
    M crypto/cms/cms_asn1.c
    M crypto/cms/cms_local.h
    M crypto/cms/cms_sd.c
    M crypto/cms/cms_smime.c
    A fuzz/corpora/cms/2aba8037213156ea1593054768d4576cb8d08309
    A fuzz/corpora/cms/2aba8037213156ea1593054768d4576cb8d083ed
    M test/recipes/80-test_cms.t

  Log Message:
  -----------
  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 at gmail.com>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22008)




More information about the openssl-commits mailing list