Assert when an error occurs while opening a Secure Channel
As of e0cb967d , if the following sequence of events occur:
- A client connects to a server, sends a Hello, receives an ACK, and sends an OpenSecureChannel message
- The server sends back an error message (in that case
BadTcpInternalError
)
then
- The
INT_SC_RCV_ERR
case ofSOPC_SecureConnectionStateMgr_Dispatcher
gets invoked, and callsSC_CloseSecureConnection
, which callsSC_CloseConnection
at line 454, freeing the secure connection data structures. - Later, the request timeout timer fires, and gets dispatched in the same dispatcher as a
TIMER_SC_REQUEST_TIMEOUT
. It fetches the secure connection by its id, does not check its state, and tries to access some of its data structures. 💣