[OpenSIPS-Devel] TLS cleanup

Dan Pascu dan at ag-projects.com
Mon Jan 13 08:14:48 EST 2020


I noticed that tls_conn_clean() is not called with a lock. All other SSL operations that reads/writes to the connection will lock it with conn->write_lock. tls_conn_clean() ends up calling SSL_shutdown() which will write to the connection as SSL shutdown implies an exchange with the other endpoint.

It also seems that conn->write_lock is destroyed right before calling conn_clean(), so at the moment it can't even be used.

Can someone with a better understanding of the way SSL code interacts with the multi-process nature of opensips take a look and check if we really do not need to call tls_conn_clean() with a lock?

--
Dan







More information about the Devel mailing list