Skip to content

Commit 079ed98

Browse files
authored
Protect against nullptr access during SSL Callback (#6866)
1 parent fd4e818 commit 079ed98

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

iocore/net/SSLClientUtils.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ verify_callback(int signature_ok, X509_STORE_CTX *ctx)
5353
// No enforcing, go away
5454
if (netvc == nullptr) {
5555
// No netvc, very bad. Go away. Things are not good.
56-
Warning("Netvc gone by in verify_callback");
56+
SSLDebug("WARN, Netvc gone by in verify_callback");
5757
return false;
5858
} else if (netvc->options.verifyServerPolicy == YamlSNIConfig::Policy::DISABLED) {
5959
return true; // Tell them that all is well

iocore/net/SSLUtils.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ ssl_callback_info(const SSL *ssl, int where, int ret)
10191019

10201020
SSLNetVConnection *netvc = SSLNetVCAccess(ssl);
10211021

1022-
if ((where & SSL_CB_ACCEPT_LOOP) && netvc->getSSLHandShakeComplete() == true &&
1022+
if (netvc && (where & SSL_CB_ACCEPT_LOOP) && netvc->getSSLHandShakeComplete() == true &&
10231023
SSLConfigParams::ssl_allow_client_renegotiation == false) {
10241024
int state = SSL_get_state(ssl);
10251025

0 commit comments

Comments
 (0)