Engine crashes when loading the configuration more than once

Bug #1951943 reported by Dimitri John Ledkov
32
This bug affects 2 people
Affects Status Importance Assigned to Milestone
openssl (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned
Hirsute
Fix Released
Undecided
Unassigned
Impish
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

 * Engine crashes when loading the configuration more than once

 * Upstream started to avoid loading engines twice by using dynamic ids to track the loaded engines correctly

 * OpenSSL 3
https://github.com/openssl/openssl/commit/81c11349c2a0e945aa3dfc6bd81c957363dd2011 (bugfix)
https://github.com/openssl/openssl/commit/38e2957249c90317a26a080c7e7eb186dd5b6598 (test case)

 * OpenSSL 1.1.1 backports:
https://github.com/openssl/openssl/commit/9b06ebb1edfddffea083ba36090af7eb7cad207b (bugfix)
https://github.com/openssl/openssl/pull/17083 (test case)

[Test Plan]

 * https://github.com/openssl/openssl/issues/17023 lists multiple ways how one can trigger the issue at hand, but also test case implements this issue too by explicitly attempting to load an engine multiple times and checking that it is operational.

The test a is run during the build as part of the upstream regression test suite, for the shared library build (as static build does not support engines), so you'll see one pass and one skip in the log.

[Where problems could occur]

 * Separately we have started to fix userspace packages that needlessly load configuration files multiple times, which used to trigger this issue. The codepaths changed are with engine use, how they are loaded/unloaded/used. It is possible that this fix will make some engines to start working and be used resulting in new behaviour. But also exposing bugs in the engines that previously were installed & configured but not actually used.

[Other Info]

 * Previous bug reports about this issues are:
https://bugs.launchpad.net/ubuntu/+source/wget/+bug/1921518
https://bugs.launchpad.net/ubuntu/+source/curl/+bug/1940528

description: updated
description: updated
description: updated
Changed in openssl (Ubuntu Impish):
status: New → In Progress
Changed in openssl (Ubuntu Hirsute):
status: New → In Progress
description: updated
Changed in openssl (Ubuntu Focal):
status: New → In Progress
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in openssl (Ubuntu Bionic):
status: New → Confirmed
Changed in openssl (Ubuntu):
status: New → Confirmed
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Dimitri, or anyone else affected,

Accepted openssl into impish-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/openssl/1.1.1l-1ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-impish to verification-done-impish. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-impish. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in openssl (Ubuntu Impish):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-impish
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Dimitri, or anyone else affected,

Accepted openssl into hirsute-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/openssl/1.1.1j-1ubuntu3.6 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-hirsute to verification-done-hirsute. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-hirsute. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in openssl (Ubuntu Hirsute):
status: In Progress → Fix Committed
tags: added: verification-needed-hirsute
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Dimitri, or anyone else affected,

Accepted openssl into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/openssl/1.1.1f-1ubuntu2.10 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in openssl (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed-focal
Changed in openssl (Ubuntu Bionic):
status: Confirmed → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Dimitri, or anyone else affected,

Accepted openssl into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/openssl/1.1.1-1ubuntu2.1~18.04.14 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Eyal Itkin (eitkin) wrote :

Tested libssl1.1_1.1.1f-1ubuntu2.10_arm64.deb on an arm64 setup with older wget installed (1.20.3-1ubuntu1), and PKA engine (1.3) configured with debug prints.

OpenSSL indeed loaded the PKA engine only once, causing wget to work as expected even without wget's patch against loading the engines only once - https://bugs.launchpad.net/ubuntu/+source/wget/+bug/1921518.

I approve that this libssl package successfully addresses the engine issue that it aims to resolve.

Revision history for this message
Julian Andres Klode (juliank) wrote :

Thanks for testing! It also built successfully on all releases, so it did not crash during tests, so marking this as verified.

tags: added: verification-done verification-done-bionic verification-done-focal verification-done-hirsute verification-done-impish
removed: verification-needed verification-needed-bionic verification-needed-focal verification-needed-hirsute verification-needed-impish
Revision history for this message
Brian Murray (brian-murray) wrote (last edit ):

What is the plan for fixing this in Jammy (which has a version lower than the version in impish-proposed)?

Revision history for this message
Brian Murray (brian-murray) wrote :

The version of openssl in jammy is no longer lower than the one in impish-proposed, but the jammy version of openssl doesn't continue the fix for this bug so the question still is valid.

Changed in openssl (Ubuntu Jammy):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openssl - 1.1.1l-1ubuntu1.1

---------------
openssl (1.1.1l-1ubuntu1.1) impish; urgency=medium

  * Cherry-pick upstream fixes to prevent double engine loading (LP: #1951943)

 -- Julian Andres Klode <email address hidden> Wed, 24 Nov 2021 10:53:29 +0100

Changed in openssl (Ubuntu Impish):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for openssl has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openssl - 1.1.1j-1ubuntu3.6

---------------
openssl (1.1.1j-1ubuntu3.6) hirsute; urgency=medium

  * Cherry-pick upstream fixes to prevent double engine loading (LP: #1951943)

 -- Julian Andres Klode <email address hidden> Wed, 24 Nov 2021 11:32:57 +0100

Changed in openssl (Ubuntu Hirsute):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openssl - 1.1.1f-1ubuntu2.10

---------------
openssl (1.1.1f-1ubuntu2.10) focal; urgency=medium

  * Cherry-pick upstream fixes to prevent double engine loading (LP: #1951943)

 -- Julian Andres Klode <email address hidden> Wed, 24 Nov 2021 14:20:48 +0100

Changed in openssl (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openssl - 1.1.1-1ubuntu2.1~18.04.14

---------------
openssl (1.1.1-1ubuntu2.1~18.04.14) bionic; urgency=medium

  * Cherry-pick upstream fixes to prevent double engine loading (LP: #1951943)

 -- Julian Andres Klode <email address hidden> Wed, 24 Nov 2021 14:50:16 +0100

Changed in openssl (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Eyal Itkin (eitkin) wrote :

Hi, might be missing something here, but if OpenSSL integrated their fix across all versions, what is holding Jammy from getting a new package with this fix?

Is it just an issue of time for testing it? Or is it something that is missing?

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openssl - 3.0.1-0ubuntu1

---------------
openssl (3.0.1-0ubuntu1) jammy; urgency=medium

  * New upstream release (LP: #1955026).
    + Dropped patches, merged upstream:
      - d/p/double-engine-load*
      - d/p/Add-null-digest-implementation-to-the-default-provid.patch
      - d/p/Don-t-create-an-ECX-key-with-short-keys.patch
    + Refreshed patches:
      - d/p/c_rehash-compat.patch

 -- Simon Chopin <email address hidden> Thu, 16 Dec 2021 09:10:48 +0100

Changed in openssl (Ubuntu Jammy):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers