]> 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:36:54 +0000 (09:36 +0100)
commit84f92b497afebd27bd2d441d3ca39c8616c52fba
tree6754f56d12fe05a67c47d5ceb1ff2be0f63f0d37
parent7379e71a698bc296942cf558222853b1a85e2711
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