diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2024-03-12 20:04:56 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2024-08-16 10:09:06 +0200 |
commit | 4cf3cbe52c99d5a568aaecd68f7e202c197d1baa (patch) | |
tree | 22c1b0a9768b94f958e897fccb766b0b12ecf2e5 /crypto/bf/bf_ecb.c | |
parent | 22f1a8ff78320cc0abd8f943c8fefd5e8dcdea1f (diff) |
Fix unpredictible refcount handling of d2i functionsopenssl-3.2
The passed in reference of a ref-counted object
is free'd by d2i functions in the error handling.
However if it is not the last reference, the
in/out reference variable is not set to null here.
This makes it impossible for the caller to handle
the error correctly, because there are numerous
cases where the passed in reference is free'd
and set to null, while in other cases, where the
passed in reference is not free'd, the reference
is left untouched.
Therefore the passed in reference must be set
to NULL even when it was not the last reference.
Fixes #23713
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22809)
(cherry picked from commit d550d2aae531c6fa2e10b1a30d2acdf373663889)
Diffstat (limited to 'crypto/bf/bf_ecb.c')
0 files changed, 0 insertions, 0 deletions