]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix a possible use-after-free in custom_exts_free
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Mon, 20 Nov 2023 09:05:49 +0000 (10:05 +0100)
committerRichard Levitte <levitte@openssl.org>
Wed, 22 Nov 2023 08:37:19 +0000 (09:37 +0100)
commit92889328fbbb2344339f7c90afc449f6eb9b11a6
treee7b7b7fab6d8ac01a6dc0f38c9e5389360c1a3fe
parent700371f78466fd3f9c20feea1938dedfbd213138
Fix a possible use-after-free in custom_exts_free

This may happen when ssl_cert_dup calls custom_exts_copy, where
a possible memory allocation error causes custom_exts_free
to be called twice: once in the error handling of custom_exts_copy
and a second time in the error handling of ssl_cert_dup.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22772)

(cherry picked from commit bc0773bbbd4d3ace6957385f1f22a5cda25dc94f)
ssl/statem/extensions_cust.c