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 2141597 - FIPS self-test data for RSA-CRT contains incorrect parameters
Summary: FIPS self-test data for RSA-CRT contains incorrect parameters
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: openssl
Version: 9.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Dmitry Belyavskiy
QA Contact: Alicja Kario
URL:
Whiteboard:
: 2141598 2141599 (view as bug list)
Depends On:
Blocks: 2141598 2141599 2144006 2144007
TreeView+ depends on / blocked
 
Reported: 2022-11-10 08:44 UTC by Dmitry Belyavskiy
Modified: 2023-05-09 10:31 UTC (History)
3 users (show)

Fixed In Version: openssl-3.0.7-1.el9
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 2141598 2141599 2144006 2144007 (view as bug list)
Environment:
Last Closed: 2023-05-09 08:20:47 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openssl openssl pull 19501 0 None closed Use RSA CRT parameters in FIPS self tests. 2022-11-10 08:46:36 UTC
Red Hat Issue Tracker CRYPTO-8738 0 None None None 2022-11-10 10:20:09 UTC
Red Hat Issue Tracker RHELPLAN-138921 0 None None None 2022-11-10 09:17:17 UTC
Red Hat Product Errata RHSA-2023:2523 0 None None None 2023-05-09 08:21:25 UTC

Description Dmitry Belyavskiy 2022-11-10 08:44:18 UTC
At https://github.com/openssl/openssl/blob/master/providers/fips/self_test_data.inc#L1269-L1279:

    ST_KAT_PARAM_BIGNUM(OSSL_PKEY_PARAM_RSA_N, rsa_n),
    ST_KAT_PARAM_BIGNUM(OSSL_PKEY_PARAM_RSA_E, rsa_e),
    ST_KAT_PARAM_BIGNUM(OSSL_PKEY_PARAM_RSA_D, rsa_d),
    ST_KAT_PARAM_BIGNUM(OSSL_PKEY_PARAM_RSA_FACTOR, rsa_p),
    ST_KAT_PARAM_BIGNUM(OSSL_PKEY_PARAM_RSA_FACTOR, rsa_q),
    ST_KAT_PARAM_BIGNUM(OSSL_PKEY_PARAM_RSA_EXPONENT, rsa_dp),
    ST_KAT_PARAM_BIGNUM(OSSL_PKEY_PARAM_RSA_EXPONENT, rsa_dq),
    ST_KAT_PARAM_BIGNUM(OSSL_PKEY_PARAM_RSA_COEFFICIENT, rsa_qInv),
    ST_KAT_PARAM_END()
However, https://github.com/openssl/openssl/blob/master/providers/implementations/keymgmt/rsa_kmgmt.c#L244-L252 defines the correct parameters (in FIPS mode, which is relevant for the FIPS self-test data) as:

# define RSA_KEY_MP_TYPES()                                                    \
OSSL_PARAM_BN(OSSL_PKEY_PARAM_RSA_FACTOR1, NULL, 0),                           \
OSSL_PARAM_BN(OSSL_PKEY_PARAM_RSA_FACTOR2, NULL, 0),                           \
OSSL_PARAM_BN(OSSL_PKEY_PARAM_RSA_EXPONENT1, NULL, 0),                         \
OSSL_PARAM_BN(OSSL_PKEY_PARAM_RSA_EXPONENT2, NULL, 0),                         \
OSSL_PARAM_BN(OSSL_PKEY_PARAM_RSA_COEFFICIENT1, NULL, 0),
See also https://github.com/openssl/openssl/blob/master/crypto/rsa/rsa_mp_names.c

As a result of this bug, the actual keys loaded will never be RSA-CRT keys.

Comment 1 Clemens Lang 2022-11-10 12:31:31 UTC
*** Bug 2141598 has been marked as a duplicate of this bug. ***

Comment 2 Clemens Lang 2022-11-10 12:31:43 UTC
*** Bug 2141599 has been marked as a duplicate of this bug. ***

Comment 12 errata-xmlrpc 2023-05-09 08:20:47 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 (Low: openssl security and bug fix update), 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-2023:2523


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