Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionAlexey Tikhonov
2019-06-14 16:46:35 UTC
PRNG is used a lot in SSSD sources. Not all cases fall under notion of "security relevant functionality".
But some does.
For example `util/secrets/secrets.c:generate_master_key()`: from my POV, this code may be considered "security relevant", but it uses "/dev/urandom" to generate encryption key, which is not FIPS approved method.
I think it is a good idea to introduce appropriate PRNG wrappers (backed by RAND_bytes() in case of OpenSSL crypto backend) into `util/crypto` and to use those wrappers in every applicable case where "raw" rand(), "/dev/urandom", etc are used now (there are might be some exceptions since it is undesirable to link some components like client libs and resolver with additional libraries).
I ran some smart card sssd sanity tests to cover at least some of the sanity verification for this:
Version ::
sssd-2.2.3-15.el8.x86_64
Results ::
Confirm FIPS:
[root@rhel8-2 ~]# sysctl -n crypto.fips_enabled
1
[root@rhel8-2 ~]# update-crypto-policies --show
FIPS
Setup to be attached
Test with SSH:
[root@rhel8-2 ca]# ssh -I /usr/lib64/opensc-pkcs11.so -l testuser localhost hostname
FIPS mode initialized
The authenticity of host 'localhost (::1)' can't be established.
ECDSA key fingerprint is SHA256:GKon2+AlbuJ5FxfHBeXL9+87snhlFOwJ/ZJEv5cT71k.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
Enter PIN for 'testuser (MyEID)':
rhel8-2.example.com
Test with SU:
[root@rhel8-2 ~]# su - testuser -c 'su - testuser -c whoami'
PIN for testuser (MyEID):
testuser
Test GDM service with sssctl:
[root@rhel8-2 ~]# sssctl user-checks -s gdm-smartcard "" -a auth
user:
action: auth
service: gdm-smartcard
testing pam_authenticate
PIN for testuser (MyEID):
pam_authenticate for user [testuser]: Success
PAM Environment:
- PKCS11_LOGIN_TOKEN_NAME=testuser (MyEID)
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2020:1863