rsyslog / librelp

OFFICIAL librelp repository on github
https://www.rsyslog.com/librelp/
GNU General Public License v3.0
30 stars 35 forks source link

openssl: fix openssl exit code avoid double free of ctx #236

Closed alorbach closed 2 years ago

alorbach commented 2 years ago

When more than one librelp instance are used in the same process, and the relpTcpExitTLS call was called a second time, the process could freeze due a double free (See SSL_CTX_free call).

Thanks to David GOUARIN david.gouarin@thalesgroup.com for the discovery and initial fix.

Also added an openssl instance counter to avoid freeing the SSL library which could be still in use by another librelp instance in the same process.

closes: #235