Bug 1845854 - [rng-tools] lacks dependency on package opensc which provides missing library /usr/lib64/opensc-pkcs11.so
Summary: [rng-tools] lacks dependency on package opensc which provides missing library...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rng-tools
Version: 37
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Vladis Dronov
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-10 09:20 UTC by Joachim Frieben
Modified: 2023-02-11 01:32 UTC (History)
7 users (show)

Fixed In Version: rng-tools-6.16-1.fc37 rng-tools-6.16-1.fc36
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-02-11 00:31:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Joachim Frieben 2020-06-10 09:20:26 UTC
Description of problem:
Inspection of service rngd in the output of command journalctl reveals that a dependency on library /usr/lib64/opensc-pkcs11.so provided by package opensc is not fulfilled:

Jun 7 14:22:00 localhost rngd[1734]: [pkcs11]: PKCS11 Engine /usr/lib64/opensc-pkcs11.so Error: No such file or directory
Jun 7 14:22:00 localhost rngd[1734]: [pkcs11]: Initialization Failed

Version-Release number of selected component (if applicable):
rng-tools-6.9-3.fc32

How reproducible:
Always

Steps to Reproduce:
1. (Re)-start service rngd.
2. Inspect the output of command journalctl.

Actual results:
Initialization of source PKCS11 fails because of missing library /usr/lib64/opensc-pkcs11.so.

Expected results:
Initialization of source PKCS11 succeeds.

Additional info:
After executing 'dnf install /usr/lib64/opensc-pkcs11.so', package opensc gets installed along with required dependencies effectively resolving this issue. It neeeds to be added to the dependencies of package rng-tools.

Comment 1 Joachim Frieben 2020-06-12 18:53:35 UTC
The error message only disappears after installing package opensc when restarting service rngd, but it persists when rngd is launched during the boot procedure.

Comment 2 Neil Horman 2020-06-15 12:56:27 UTC
This is by design.  Access to opensc-pkcs11.so is done via dlopen, not by link time binding.  failure to find the dso is not fatal to the operation of rngd, it only means that that entropy source is unusable to rngd at the current time.  I don't want to create a package dependency between rng-tools and opensc, because doing so implies that the opensc pacakge will have to be pulled into the initramfs, and access to that relatively low volume entropy source is less important than minimization of the initramfs.

we can talk about changing the error message if you like, but as it currently stands, unless you have an explicit need for the smartcard entropy source in your initramfs, I'm inclined to close this as not a bug.

Comment 3 Joachim Frieben 2020-07-02 09:10:59 UTC
(In reply to Neil Horman from comment #2)
I do not quite see the point of minimizing the size of the initramfs at "any cost" for recent hardware but leaving things as they are right now might still be better than disabling smart-card support in rng-tools builds altogether because interested users can then at least restart rngd once a system on which package opensc is installed has started up.

Comment 4 Christian Stadelmann 2023-01-25 12:50:18 UTC
As per bug #1891025, it seems like this is still an issue on hardware which does not have any better source of randomness.

How about using a weak dependency (`Recommends:`) instead?

Comment 5 Vladis Dronov 2023-01-25 16:37:21 UTC
Given that we do not install rngd by default anymore (after the kernel-early-entropy patch),
it look like we can indeed add a week dependency for opensc. In parallel, we can also make
an error message more detailed. "No pkcs11 endpoints found, install opensc if you would like
to gather smartcard entropy" or some such sounds good.

On the other hand, as smartcard entropy does not seem to be a frequent use case and as pkcs11
entropy source is disabled by default in Fedora, I would rather use a hint (Suggests: opensc).

Comment 6 Vladis Dronov 2023-01-25 16:40:02 UTC
...and, yeah, an upstream patch for rngd.8.in explaining the requirement for opensc (or a similar package in other distros).

Comment 7 Vladis Dronov 2023-01-25 17:43:11 UTC
packages containing opensc-pkcs11.so in other distros:

debian - opensc-pkcs11
ubuntu - opensc-pkcs11

Comment 9 Fedora Update System 2023-02-02 21:06:50 UTC
FEDORA-2023-a2aeee9847 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2023-a2aeee9847

Comment 10 Fedora Update System 2023-02-02 21:12:27 UTC
FEDORA-2023-2c0dd54342 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-2c0dd54342

Comment 11 Fedora Update System 2023-02-03 01:53:12 UTC
FEDORA-2023-a2aeee9847 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-a2aeee9847`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-a2aeee9847

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2023-02-03 02:56:35 UTC
FEDORA-2023-2c0dd54342 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-2c0dd54342`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-2c0dd54342

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2023-02-11 00:31:55 UTC
FEDORA-2023-2c0dd54342 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 14 Fedora Update System 2023-02-11 01:32:44 UTC
FEDORA-2023-a2aeee9847 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.