[openssl/openssl] 12f679: crypto/x509/x509_lu.c: fix memory leak in obj_ht_f...

0 views
Skip to first unread message

nikolapajkovsky

unread,
Jul 17, 2026, 2:39:37 AM (3 days ago) Jul 17
to openssl...@openssl.org
Branch: refs/heads/openssl-4.0
Home: https://github.com/openssl/openssl
Commit: 12f67950a7f45abce5007e212636ad5078afd846
https://github.com/openssl/openssl/commit/12f67950a7f45abce5007e212636ad5078afd846
Author: Nikola Pajkovsky <nik...@openssl.org>
Date: 2026-07-17 (Fri, 17 Jul 2026)

Changed paths:
M crypto/x509/x509_lu.c

Log Message:
-----------
crypto/x509/x509_lu.c: fix memory leak in obj_ht_foreach_object()

when sk_X509_OBJECT_push() fails after x509_object_dup() has already
allocated the duplicate, the dup is neither stored on the destination
stack nor freed: the error path only pop_free()s the stack the dup was
never pushed onto, so it is leaked.

Fixes: 08cecb4448e9 "Add X509_STORE_get1_objects"
Fixes: https://github.com/openssl/openssl/issues/31771
Signed-off-by: Nikola Pajkovsky <nik...@openssl.org>

Reviewed-by: Milan Broz <mb...@openssl.org>
Reviewed-by: Paul Dale <paul...@oracle.com>
Reviewed-by: Eugene Syromiatnikov <es...@openssl.org>
MergeDate: Fri Jul 17 06:36:48 2026
(Merged from https://github.com/openssl/openssl/pull/31810)



To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications
Reply all
Reply to author
Forward
0 new messages