Re: illegal instruction crash 5.50 Debian/Stretch

Michal Trojnara <[email protected]> Wed, 24 Apr 2019 21:54:02 +0200
Newsgroups gmane.network.stunnel.user
Message-ID <[email protected]>
On 24.04.2019 16:06, Florian Lohoff wrote:
> with the stunnel4 in Debian/Stretch i am experiencing pretty regular
> crashes with illegal instruction. Version is 5.50.
> In Bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=880659
> you can see the drill down to a Lock beeing unlocked although
> not locked. When i look at the code its some usage of openssl
> primitives. (Unlock happens in openssl code)
> I had a quick look at the changelog and this:
> "Service threads are terminated before OpenSSL cleanup to prevent occasional stunnel crashes at shutdown."
> sounds a bit like the issue i am experiencing.
> Can you confirm this?

Yes, I do confirm this is the issue described in the Debian bug #880659.

It wasn't a simple coding error, but rather a design flaw introduced in
version 3.0 that took 20 years to identify and fix.  Before version
5.18, released almost 4 years ago, the shutdown race condition mostly
manifested itself while terminating stunnel under extremely heavy load,
such as stress testing.  The probability has increased with the
introduction of periodic DH parameter regeneration in version 5.18.  I
didn't test it, but I suspect some changes in the OpenSSL internals may
have also cause the crashes to only surface fairly recently, and not 20
years ago.

The fix itself involves a major redesign of the stunnel threading
subsystem, so I made a beta version and I'd appreciate your help with
testing it:
https://www.stunnel.org/downloads/beta/stunnel-5.54b2.tar.gz

Best regards,
    Mike

_______________________________________________
stunnel-users mailing list
[email protected]
https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEK8fk5n48wMG+py+MLvx/8NQW4BQFAlzAvtsACgkQLvx/8NQW
4BQP0xAAs1XP0OPJPWTZkmXcx2Ojudvfu4uq+FEJT7c5IzYBPemFmtPU4ZU1MoI5
1yc86JrEZ1+zt1SrL1bJ5SoljyCDcSZS3Fw6p3qqzsJ5iE/y6C+QQPaz1WaIYEjG
VTv4tajxN+4KaZFk28xGD289so2WOpYnDwHo+4mrX1A9smy56HnGDwCbV7zx0G+r
LdSI+LkPisZFZADZBDaC7tv5qsnNlCfsSYKnJ06Ev6ZZK8Pqe2XdZlU21OcmV16M
9pNgP0OMhuqipSs/S50xCd7KPQ2GpL69ScXdApu6VMbrLqhjYrfv4ZZT/1I4qt+a
POX6b4PwkzNzHWlEWyEAi9F9NbdQVny6Tx12w1ydm4yIZxVKcjLuFyazhI4w21DT
EA5nKNQIndF4RgxXyKRTaAuJsQFA7b1qNXpEpGjIzAS0cw57+HQ4TvpUk0OZ22x4
8/zWOGpHIhg5RZa/S9vKJolFCUAnyjn14X67KzRg93WnmkNC+qzpezm2W+Lzduyp
HVaDUDforrmJ3T6vKEdvQP57mYRwpj2SeMZEM130Ol90Fn+9viqDEDvmvxf5Swyl
bEIw+g0SUn73yZ1ORzf0/MFBFMdb+s1kWxRrbfG1KD5Jl0jgEq/3b/OIS/IR6mE8
WQDsoG+ENAG/17ASFKzEFXt/IlaSGVtew6NV3PDUHiTkQSvtVGc=
=6bHz
-----END PGP SIGNATURE-----