OpenSSL use-after-free when reading PEM data into an existing stack
If an application passes an existing stack to PEM_X509_INFO_read_bio_ex() and the read fails, OpenSSL frees every entry in the stack but leaves the freed pointers in the stack. Reading or freeing the stack afterwards may cause the application to crash or, in principle, corrupt memory.
CERT24