#1014180 src:boost1.74: Cleanup code of boost::asio causes crashes with OpenSSL 3+

Package:
src:boost1.74
Source:
boost1.74
Submitter:
Hilko Bengen
Date:
2022-07-04 07:51:13 UTC
Severity:
serious
Tags:
#1014180#5
Date:
2022-07-01 16:03:10 UTC
From:
To:
Dear Maintainer,

I recently received #1013470 (nbdkit FTBFS because of segfaults when
running test suite); this turned out to be caused by #1013931 (segfault
in libtorrent-rasterbar cleanup code), I was able to track the root
cause to an incomplete #ifdef condition in
libs/asio/include//boost/asio/ssl/detail/impl/openssl_init.ipp as of
1.74.0-16 that caused CONF_modules_unload to crash after OpenSSL 3.0+
had done its own cleanup which included calling that function.

(See discussion in <https://github.com/arvidn/libtorrent/issues/6940>.)

Please apply upstream's patch
<https://github.com/boostorg/asio/commit/74a94fe7f47b2e3f707cf4589fbb635a50f22ad2>.

After applying this patch, and rebuilding boost1.74 +
libtorrent-rasterbar, I am no longer able to reproduce the sagfaults.

Cheers,
-Hilko

#1014180#28
Date:
2022-07-01 16:32:12 UTC
From:
To:
Hello Hilko

I found the very same issue on cpprest and websocketpp but I couldn't go deeper into asio code and find the patch.

I merged the other bugs to this one, but I don't know how many others are there.

We should NMU ASAP.

G.

#1014180#33
Date:
2022-07-04 07:39:14 UTC
From:
To:
Hello, since this bug is really impacting lots of packages, I'm NMUing right now.

I spent lots of time trying to understand why cpprest and websocketpp were failing testsuite after printing "test OK",
digged into openssl code, and after a while I got the issue on boost side. Better avoid other people loosing that much time :)

diff attached, and big thanks to Hilko for opening this bug!

G.

#1014180#34
Date:
2022-07-04 07:49:12 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
boost1.74, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1013472@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Gianfranco Costamagna <locutusofborg@debian.org> (supplier of updated boost1.74 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Mon, 04 Jul 2022 09:34:02 +0200
Source: boost1.74
Built-For-Profiles: noudeb
Architecture: source
Version: 1.74.0-16.1
Distribution: unstable
Urgency: medium
Maintainer: Debian Boost Team <team+boost@tracker.debian.org>
Changed-By: Gianfranco Costamagna <locutusofborg@debian.org>
Closes: 1013472 1013530 1014180
Changes:
 boost1.74 (1.74.0-16.1) unstable; urgency=medium
 .
   * Non-maintainer upload.
   * debian/patches/74a94fe7f47b2e3f707cf4589fbb635a50f22ad2.patch:
     - cherry-pick upstream asio change to fix exit failures with openssl 3.0.4
       Closes: #1014180, #1013530, #1013472 and many others probably
Checksums-Sha1:
 d58a7dcb8da934102f96122f9bb0b1dbeba23d71 9118 boost1.74_1.74.0-16.1.dsc
 292723aafe4a8297d4d0627e285e5422d8b79726 372764 boost1.74_1.74.0-16.1.debian.tar.xz
 3f6bdb5db4febb7b53b958c34dac5a86be2b559f 9875 boost1.74_1.74.0-16.1_source.buildinfo
Checksums-Sha256:
 8633b063161f1d0e47900d0e1f63f20252f0d9a51b8819e84b66ef6952c0a52e 9118 boost1.74_1.74.0-16.1.dsc
 16051b2b3aad9248936290e04f97a5586925c5e6104f7bc3968ab17bd5284648 372764 boost1.74_1.74.0-16.1.debian.tar.xz
 2d7cdceee0a9cbf494e5618e7af0d783c43fc50a612e8b8e0d9e2e8bf017b3d6 9875 boost1.74_1.74.0-16.1_source.buildinfo
Files:
 9c73424927c50e038b09deafcd65b014 9118 libs optional boost1.74_1.74.0-16.1.dsc
 651d18ce45a3f7d15d3b604e54c8cad4 372764 libs optional boost1.74_1.74.0-16.1.debian.tar.xz
 bd943e11074e26ff2af827d76189c2bb 9875 libs optional boost1.74_1.74.0-16.1_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEkpeKbhleSSGCX3/w808JdE6fXdkFAmLCmcAACgkQ808JdE6f
XdlwBQ/9E8wJDFpsQVtX1WCxCW9yppaxAF+i1SxrAzLStLa9lllTrqqkcvM9/xYe
xOFaObBlYq3YLMIGZoVYcpkgfSh2Q1UL+Y32V4EQVRbrF7OdgZM1I6AF0xXBlMK0
J1HRdh+YEZHQxbDxL/KSP/FzJs6X1BOhee/qb3hc4tIBu6Dby5CfeyQ5NWFbOMj7
8orBZm9SOlHz0bOXSOSjcKJIXCMX2XCfeb4eiUpjUqESovB2Ey/AJPWQJkZykaGL
MDqPvVctF5qV4Lj08dPYQiBlwKaZ17+/BdJ6tMdngQJ8TGQzUIcdeHqAarnfcXd1
Ef1oNQcFx1E7Fm59qVgX3UarCnvT7xsju99GYbXEhxAFnQ8bR/V07KpkY/ZmJcy2
E81+OE6eRdaZtLTEqg9myieocxWGR7iYhdZEkOruy8y7sb/DJ8zc2HbISu3LmjV5
mOosl3bgD9PJIsh9nUMDYDAfZZtWVDWTOccVpet2ueiq01ZTmCOM09G6277pfu7e
YwFQ1KFK1Fkqw1SssrDw8tXBD6SR7bcNzNZfOqlE0VvGNA9os027kmxosQ9Wn8Nb
hJ/WQWDKD2JzhpURL5QsgcTWhKCDMpAAUGuc6T0L8Clo+SaV7Rxh6STkg8WpIQKI
DkEY5S16ibhR9NJW4y0iM7NJ8ZY+dBz98+LYSkOkH1sLqyQ4eNE=
=Ado0
-----END PGP SIGNATURE-----

#1014180#35
Date:
2022-07-04 07:49:12 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
boost1.74, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1013530@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Gianfranco Costamagna <locutusofborg@debian.org> (supplier of updated boost1.74 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Mon, 04 Jul 2022 09:34:02 +0200
Source: boost1.74
Built-For-Profiles: noudeb
Architecture: source
Version: 1.74.0-16.1
Distribution: unstable
Urgency: medium
Maintainer: Debian Boost Team <team+boost@tracker.debian.org>
Changed-By: Gianfranco Costamagna <locutusofborg@debian.org>
Closes: 1013472 1013530 1014180
Changes:
 boost1.74 (1.74.0-16.1) unstable; urgency=medium
 .
   * Non-maintainer upload.
   * debian/patches/74a94fe7f47b2e3f707cf4589fbb635a50f22ad2.patch:
     - cherry-pick upstream asio change to fix exit failures with openssl 3.0.4
       Closes: #1014180, #1013530, #1013472 and many others probably
Checksums-Sha1:
 d58a7dcb8da934102f96122f9bb0b1dbeba23d71 9118 boost1.74_1.74.0-16.1.dsc
 292723aafe4a8297d4d0627e285e5422d8b79726 372764 boost1.74_1.74.0-16.1.debian.tar.xz
 3f6bdb5db4febb7b53b958c34dac5a86be2b559f 9875 boost1.74_1.74.0-16.1_source.buildinfo
Checksums-Sha256:
 8633b063161f1d0e47900d0e1f63f20252f0d9a51b8819e84b66ef6952c0a52e 9118 boost1.74_1.74.0-16.1.dsc
 16051b2b3aad9248936290e04f97a5586925c5e6104f7bc3968ab17bd5284648 372764 boost1.74_1.74.0-16.1.debian.tar.xz
 2d7cdceee0a9cbf494e5618e7af0d783c43fc50a612e8b8e0d9e2e8bf017b3d6 9875 boost1.74_1.74.0-16.1_source.buildinfo
Files:
 9c73424927c50e038b09deafcd65b014 9118 libs optional boost1.74_1.74.0-16.1.dsc
 651d18ce45a3f7d15d3b604e54c8cad4 372764 libs optional boost1.74_1.74.0-16.1.debian.tar.xz
 bd943e11074e26ff2af827d76189c2bb 9875 libs optional boost1.74_1.74.0-16.1_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEkpeKbhleSSGCX3/w808JdE6fXdkFAmLCmcAACgkQ808JdE6f
XdlwBQ/9E8wJDFpsQVtX1WCxCW9yppaxAF+i1SxrAzLStLa9lllTrqqkcvM9/xYe
xOFaObBlYq3YLMIGZoVYcpkgfSh2Q1UL+Y32V4EQVRbrF7OdgZM1I6AF0xXBlMK0
J1HRdh+YEZHQxbDxL/KSP/FzJs6X1BOhee/qb3hc4tIBu6Dby5CfeyQ5NWFbOMj7
8orBZm9SOlHz0bOXSOSjcKJIXCMX2XCfeb4eiUpjUqESovB2Ey/AJPWQJkZykaGL
MDqPvVctF5qV4Lj08dPYQiBlwKaZ17+/BdJ6tMdngQJ8TGQzUIcdeHqAarnfcXd1
Ef1oNQcFx1E7Fm59qVgX3UarCnvT7xsju99GYbXEhxAFnQ8bR/V07KpkY/ZmJcy2
E81+OE6eRdaZtLTEqg9myieocxWGR7iYhdZEkOruy8y7sb/DJ8zc2HbISu3LmjV5
mOosl3bgD9PJIsh9nUMDYDAfZZtWVDWTOccVpet2ueiq01ZTmCOM09G6277pfu7e
YwFQ1KFK1Fkqw1SssrDw8tXBD6SR7bcNzNZfOqlE0VvGNA9os027kmxosQ9Wn8Nb
hJ/WQWDKD2JzhpURL5QsgcTWhKCDMpAAUGuc6T0L8Clo+SaV7Rxh6STkg8WpIQKI
DkEY5S16ibhR9NJW4y0iM7NJ8ZY+dBz98+LYSkOkH1sLqyQ4eNE=
=Ado0
-----END PGP SIGNATURE-----

#1014180#40
Date:
2022-07-04 07:49:12 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
boost1.74, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1014180@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Gianfranco Costamagna <locutusofborg@debian.org> (supplier of updated boost1.74 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Mon, 04 Jul 2022 09:34:02 +0200
Source: boost1.74
Built-For-Profiles: noudeb
Architecture: source
Version: 1.74.0-16.1
Distribution: unstable
Urgency: medium
Maintainer: Debian Boost Team <team+boost@tracker.debian.org>
Changed-By: Gianfranco Costamagna <locutusofborg@debian.org>
Closes: 1013472 1013530 1014180
Changes:
 boost1.74 (1.74.0-16.1) unstable; urgency=medium
 .
   * Non-maintainer upload.
   * debian/patches/74a94fe7f47b2e3f707cf4589fbb635a50f22ad2.patch:
     - cherry-pick upstream asio change to fix exit failures with openssl 3.0.4
       Closes: #1014180, #1013530, #1013472 and many others probably
Checksums-Sha1:
 d58a7dcb8da934102f96122f9bb0b1dbeba23d71 9118 boost1.74_1.74.0-16.1.dsc
 292723aafe4a8297d4d0627e285e5422d8b79726 372764 boost1.74_1.74.0-16.1.debian.tar.xz
 3f6bdb5db4febb7b53b958c34dac5a86be2b559f 9875 boost1.74_1.74.0-16.1_source.buildinfo
Checksums-Sha256:
 8633b063161f1d0e47900d0e1f63f20252f0d9a51b8819e84b66ef6952c0a52e 9118 boost1.74_1.74.0-16.1.dsc
 16051b2b3aad9248936290e04f97a5586925c5e6104f7bc3968ab17bd5284648 372764 boost1.74_1.74.0-16.1.debian.tar.xz
 2d7cdceee0a9cbf494e5618e7af0d783c43fc50a612e8b8e0d9e2e8bf017b3d6 9875 boost1.74_1.74.0-16.1_source.buildinfo
Files:
 9c73424927c50e038b09deafcd65b014 9118 libs optional boost1.74_1.74.0-16.1.dsc
 651d18ce45a3f7d15d3b604e54c8cad4 372764 libs optional boost1.74_1.74.0-16.1.debian.tar.xz
 bd943e11074e26ff2af827d76189c2bb 9875 libs optional boost1.74_1.74.0-16.1_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEkpeKbhleSSGCX3/w808JdE6fXdkFAmLCmcAACgkQ808JdE6f
XdlwBQ/9E8wJDFpsQVtX1WCxCW9yppaxAF+i1SxrAzLStLa9lllTrqqkcvM9/xYe
xOFaObBlYq3YLMIGZoVYcpkgfSh2Q1UL+Y32V4EQVRbrF7OdgZM1I6AF0xXBlMK0
J1HRdh+YEZHQxbDxL/KSP/FzJs6X1BOhee/qb3hc4tIBu6Dby5CfeyQ5NWFbOMj7
8orBZm9SOlHz0bOXSOSjcKJIXCMX2XCfeb4eiUpjUqESovB2Ey/AJPWQJkZykaGL
MDqPvVctF5qV4Lj08dPYQiBlwKaZ17+/BdJ6tMdngQJ8TGQzUIcdeHqAarnfcXd1
Ef1oNQcFx1E7Fm59qVgX3UarCnvT7xsju99GYbXEhxAFnQ8bR/V07KpkY/ZmJcy2
E81+OE6eRdaZtLTEqg9myieocxWGR7iYhdZEkOruy8y7sb/DJ8zc2HbISu3LmjV5
mOosl3bgD9PJIsh9nUMDYDAfZZtWVDWTOccVpet2ueiq01ZTmCOM09G6277pfu7e
YwFQ1KFK1Fkqw1SssrDw8tXBD6SR7bcNzNZfOqlE0VvGNA9os027kmxosQ9Wn8Nb
hJ/WQWDKD2JzhpURL5QsgcTWhKCDMpAAUGuc6T0L8Clo+SaV7Rxh6STkg8WpIQKI
DkEY5S16ibhR9NJW4y0iM7NJ8ZY+dBz98+LYSkOkH1sLqyQ4eNE=
=Ado0
-----END PGP SIGNATURE-----