We have just hit the same problem with 5.45. 5.41 does not appear to exhibit the same issue.
The problem appears to be linked to the client/session.
Using sni if we hit the url with one client the page loads fine, if we hit stunnel with a second connection from another client on a different IP their page reloads fine. But if we reload either of those pages stunnel segfaults with the following message -
Jun 22 11:42:31 lbmaster kernel: stunnel[6510]: segfault at 178 ip 00007fc64fcb5fe0 sp 00007fc6500f5948 error 4 in libssl.so.1.0.0[7fc64fc75000+65000]
The above was generated with stunnel 5.45 and openssl 1.0.2j-fips. I also tested it with stunnel built against 1.1.0h and had the same issue.
Below is the config -
pid = /var/run/stunnel/stunnel.pid
debug = local1.0
socket = a:IP_FREEBIND=yes
fips = no
sslVersion = all
[VIP_Name-1]
cert = /etc/
loadbalancer.org/certs/sslcert1/sslcert1.pem ciphers = ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DHE-RSA-AES256-SHA256:!RC4:!MD5:!aNULL:!EDH:!3DES
accept =
192.168.0.112:443 connect =
192.168.0.112:80 delay = yes
options = NO_SSLv3
options = NO_TLSv1
options = NO_TLSv1.1
options = DONT_INSERT_EMPTY_FRAGMENTS
renegotiation = no
local = 192.168.0.112
TIMEOUTclose = 0
[fizzygood]
sni = VIP_Name-1:
lb1.testdomain.co.uk cert = /etc/
loadbalancer.org/certs/sslcert1/sslcert1.pem ciphers = ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DHE-RSA-AES256-SHA256:!RC4:!MD5:!aNULL:!EDH:!3DES
connect =
192.168.0.112:80 delay = yes
options = NO_SSLv3
options = NO_TLSv1
options = DONT_INSERT_EMPTY_FRAGMENTS
renegotiation = no
local = 192.168.0.112