Skip to content

Commit 5071090

Browse files
committed
Ensure associated netvc is still valid on SSL callbacks
Since SSL Callbacks are asynchronous in nature, it's possible the associated NetVC is already freed causing a potential use-after-free problem.
1 parent f214fcf commit 5071090

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

iocore/net/SSLUtils.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,6 +1648,8 @@ SSLNetVCAccess(const SSL *ssl)
16481648

16491649
ink_assert(dynamic_cast<SSLNetVConnection *>(static_cast<NetVConnection *>(SSL_get_ex_data(ssl, ssl_vc_index))));
16501650

1651+
ink_assert(netvc && netvc->ssl == ssl);
1652+
16511653
return netvc;
16521654
}
16531655

0 commit comments

Comments
 (0)