Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openssl: pin versions of libcrypto3 and libssl3 for CLI package #33210

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

lyoung-confluent
Copy link
Contributor

@lyoung-confluent lyoung-confluent commented Nov 4, 2024

If a Wolfi image already has an older version of the libcrypto3 and/or libssl3 package installed, and the openssl CLI is installed at runtime (or as say a docker build step), the openssl package will install correctly but will crash when used:

/ # apk list --installed | grep libcrypto
libcrypto3-3.3.2-r2 aarch64 {openssl} (Apache-2.0) [installed]
/ # apk add openssl
(1/2) Installing openssl-provider-legacy (3.4.0-r1)
(2/2) Installing openssl (3.4.0-r1)
OK: 15 MiB in 20 packages
/ # openssl
openssl: /usr/lib/libssl.so.3: version `OPENSSL_3.4.0' not found (required by openssl)
openssl: /usr/lib/libcrypto.so.3: version `OPENSSL_3.4.0' not found (required by openssl)

This is because the openssl CLI must use the exact same version (or at least the same <major>.<minor>.<patch>) of libcrypto3 and libssl3 that the openssl CLI was built with.

Currently, the relationship between openssl and libcrypto3 and libssl3 is picked up automatically by melange's SCA:

openssl-3.4.0-r1 depends on:
openssl-provider-legacy
so:ld-linux-aarch64.so.1
so:libc.so.6
so:libcrypto.so.3
so:libssl.so.3

However, this dependency will be satisfied by any version of libcrypto3 and libssl3.

This PR adds an explicit dependency on the matching versions which should prevent the installation (or force an upgrade) of the openssl CLI if the already installed libcrypto3 and/or libssl3 versions mismatch.

openssl.yaml Show resolved Hide resolved
@xnox xnox added the approved-to-run A repo member has approved this external contribution label Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved-to-run A repo member has approved this external contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants