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.
Bug 1711318 - p11_child::sign_data() function implementation is not FIPS140 compliant
Summary: p11_child::sign_data() function implementation is not FIPS140 compliant
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: sssd
Version: 8.0
Hardware: All
OS: All
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Sumit Bose
QA Contact: sssd-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-17 13:47 UTC by Alexey Tikhonov
Modified: 2020-05-02 19:11 UTC (History)
9 users (show)

Fixed In Version: sssd-2.2.0-7.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-05 22:34:25 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 5007 0 None closed p11_child::sign_data() function implementation is not FIPS140 compliant 2020-07-23 18:29:02 UTC
Github SSSD sssd issues 5008 0 None closed p11_child::sign_data() function implementation is not FIPS140 compliant 2020-07-23 18:29:02 UTC
Red Hat Product Errata RHSA-2019:3651 0 None None None 2019-11-05 22:34:44 UTC

Description Alexey Tikhonov 2019-05-17 13:47:23 UTC
There are two problems with implementation of p11_child::sign_data() function in regards of FIPS140 compliance:


(1) Usage of SHA-1.

SHA-1 is used in a signature for integrity protection which means it is a sensitive use. Thus it falls under FIPS requirements.
Also the way it is used can't be considered "used in HMAC".
Thus code must be reworked to avoid usage of SHA-1 whenever possible, i.e. implementation should lookup list of supported by Smart Card alternatives and choose more modern/FIPS approved option if available.

For Smart Cards that do not support approved alternatives this change will make impossible its usage in FIPS mode. This is expected behaviour.

Presumably "manual" hashing in case of ECC key may be dropped at all but (2) must be taken in to account.


(2) The way signature verification is implemented breaks "No Algorithm decomposition" rule from "FIPS140 Compliance Checklist":
"When applying signatures do not Hash the content on your own and then call the raw signature API, instead call the API that compute hash and signature in one shot by reading the whole message"

Comment 1 Alexey Tikhonov 2019-06-10 14:32:21 UTC
Forgot to mention: in regards of FIPS compliance we only care about codepaths with OpenSSL backend.

Comment 2 Sumit Bose 2019-07-02 15:09:21 UTC
Upstream ticket:
https://pagure.io/SSSD/sssd/issue/4039

Comment 3 Jakub Hrozek 2019-07-22 18:35:48 UTC
* master:
 * 60748f69d9e21cf4cfd0655a0d7b81a715e9ae04
 * 7f0a8f5060b28dc35e152d7290b583de99361d80

Comment 7 Scott Poore 2019-08-20 23:56:00 UTC
Verified.

Version ::

sssd-2.2.0-16.el8.x86_64

Results ::

First running standard smart card authentication test in non-FIPS mode:

[root@rhel8-2 ~]# cat /etc/sssd/conf.d/sssd_ocsp.conf 

[sssd]
certificate_verification = no_ocsp

[root@rhel8-2 ~]# su - ipauser1 -c 'su - ipauser1 -c whoami'
PIN for sctest (MyEID): 
ipauser1

[root@rhel8-2 ~]# kdestroy -A

[root@rhel8-2 ~]# kinit -X X509_user_identity=PKCS11:module_name=/usr/lib64/opensc-pkcs11.so ipauser1
sctest (MyEID)                   PIN: 

[root@rhel8-2 ~]# klist
Ticket cache: KCM:0
Default principal: ipauser1

Valid starting       Expires              Service principal
08/20/2019 18:34:27  08/21/2019 18:34:19  krbtgt/EXAMPLE.COM
[root@rhel8-2 ~]# 

Now with FIPS mode:

fips-finish-install  fips-mode-setup      
[root@rhel8-2 ~]# fips-mode-setup --enable
Setting system policy to FIPS
Note: System-wide crypto policies are applied on application start-up.
It is recommended to restart the system for the change of policies
to fully take place.
FIPS mode will be enabled.
Please reboot the system for the setting to take effect.

[root@rhel8-2 ~]# getenforce 
Enforcing

[root@rhel8-2 ~]# reboot
...

[root@rhel8-2 ~]# fips-mode-setup --check
FIPS mode is enabled.

[root@rhel8-2 ~]# kdestroy -A

[root@rhel8-2 ~]# su - ipauser1 -c 'su - ipauser1 -c whoami'
PIN for sctest (MyEID): 
ipauser1

[root@rhel8-2 ~]# kinit -X X509_user_identity=PKCS11:module_name=/usr/lib64/opensc-pkcs11.so ipauser1
sctest (MyEID)                   PIN: 

[root@rhel8-2 ~]# klist
Ticket cache: KCM:0
Default principal: ipauser1

Valid starting       Expires              Service principal
08/20/2019 18:55:08  08/21/2019 18:54:59  krbtgt/EXAMPLE.COM

[root@rhel8-2 ~]#

Comment 9 errata-xmlrpc 2019-11-05 22:34:25 UTC
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/RHSA-2019:3651


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