Check for EVP_MD being NULL inside ssl.
authorslontis <shane.lontis@oracle.com>
Tue, 12 Jul 2022 04:28:37 +0000 (14:28 +1000)
committerHugo Landau <hlandau@openssl.org>
Wed, 13 Jul 2022 07:01:55 +0000 (08:01 +0100)
commitb740012f77aed97cb4b3cd8a4f1fb2f668542795
treeb264216f804e093794d66315badda973dba66804
parenta2db4e6cd6478c3ae633d9919d0a88f1eb5678f7
Check for EVP_MD being NULL inside ssl.

Fix multiple places that could potentially segfault if memory
allocations fail. e.g. ssl_load_ciphers() could fail while calling
ssl_evp_md_fetch().

Found by #18355

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/18784)
ssl/s3_lib.c
ssl/ssl_ciph.c
ssl/statem/extensions_srvr.c
ssl/statem/statem_clnt.c
ssl/tls13_enc.c