]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix memleak in rsa_cms_sign error path
authorDaniel Gustafsson <daniel@yesql.se>
Fri, 12 Jul 2024 18:49:16 +0000 (20:49 +0200)
committerTomas Mraz <tomas@openssl.org>
Thu, 5 Sep 2024 15:05:42 +0000 (17:05 +0200)
commite347162ea39352831f78005272a5f09a75b18f4f
tree09dbcb587a6e7c3742345f188434350994200461
parent1441f2bc5b60b6cc0ca56515a95e9897c6e74936
Fix memleak in rsa_cms_sign error path

If the call to X509_ALGOR_set0 fails then the allocated ASN1_STRING
variable passed as parameter leaks.  Fix by explicitly freeing like
how all other codepaths with X509_ALGOR_set0 do.

Fixes #22680

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24868)

(cherry picked from commit 5efc57caf229748fd4f85b05463f96b11679100d)
crypto/cms/cms_rsa.c