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 2100807 - pki-tomcat/kra unable to decrypt when using RSA-OAEP padding in RHEL9 with FIPS enabled
Summary: pki-tomcat/kra unable to decrypt when using RSA-OAEP padding in RHEL9 with FI...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: jss
Version: 9.1
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: rc
: ---
Assignee: Jack Magne
QA Contact: idm-cs-qe-bugs
URL:
Whiteboard:
Depends On: 2122553
Blocks: 2123513 2184525 2089907 2122409 2122919 2123379 2184514
TreeView+ depends on / blocked
 
Reported: 2022-06-24 10:47 UTC by Trivino
Modified: 2023-11-30 10:13 UTC (History)
11 users (show)

Fixed In Version: jss-5.2.1-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2122409 2123379 2184514 (view as bug list)
Environment:
Last Closed: 2022-11-15 10:10:02 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHCS-3200 0 None None None 2022-08-22 13:58:07 UTC
Red Hat Issue Tracker RHELPLAN-126231 0 None None None 2022-06-24 10:56:20 UTC
Red Hat Product Errata RHEA-2022:8009 0 None None None 2022-11-15 10:10:14 UTC

Description Trivino 2022-06-24 10:47:17 UTC
Description of problem:

PKCS#1 v1.5 padding support was removed as it will not be allowed in FIPS mode after 2023. None of the FIPS certified modules in RHEL will support it as a FIPS approved mechanism.

IPA vault plugin is using PKCS#1 v1.5 padding, hence it is not working (https://bugzilla.redhat.com/show_bug.cgi?id=2089907). The fix is to migrate to RSA-OAEP, this scratch build provides the IPA fix:

http://brew-task-repos.usersys.redhat.com/repos/scratch/ftrivino/ipa/4.9.10/2.el9/x86_64/

with this scratch build, IPA vault is using aes-128-cbc and OAEP with SHA256 padding (with FIPS enabled)

However, the issue now appears to be in pki-tomcat/kra. Based on the logs, it looks like the KeyArchivalRequest works, but later on the decryptExternalPrivate raises an exception: "INFO: PKIExceptionMapper: Returning PKIException"

I tried enabling "keyWrap.useOAEP=true" (+restarting the service) in the CS.cfg file (with no luck):

[root@master cloud-user]# grep debug /usr/share/pki/kra/conf/CS.cfg
debug.level=0

[root@master cloud-user]# grep keyWrap /usr/share/pki/kra/conf/CS.cfg
keyWrap.useOAEP=true


btw, probably not related to this issue but something to highlight here, I do see PKCS#1v1.5 being used here:

https://github.com/dogtagpki/pki/blob/master/base/common/python/pki/crypto.py#L265




Version-Release number of selected component (if applicable):

[root@master kra]# rpm -qa  | grep pki
krb5-pkinit-1.19.1-19.el9.x86_64
python3-idm-pki-11.2.0-0.4.beta3.el9.noarch
idm-pki-base-11.2.0-0.4.beta3.el9.noarch
pki-jackson-core-2.11.4-6.el9.noarch
pki-jackson-annotations-2.11.4-6.el9.noarch
pki-jackson-databind-2.11.4-6.el9.noarch
pki-servlet-4.0-api-9.0.50-1.el9.noarch
pki-jackson-module-jaxb-annotations-2.11.4-8.el9.noarch
pki-jackson-jaxrs-providers-2.11.4-7.el9.noarch
pki-jackson-jaxrs-json-provider-2.11.4-7.el9.noarch
pki-resteasy-jackson2-provider-3.0.26-15.el9.noarch
pki-resteasy-core-3.0.26-15.el9.noarch
pki-resteasy-client-3.0.26-15.el9.noarch
idm-pki-java-11.2.0-0.4.beta3.el9.noarch
idm-pki-tools-11.2.0-0.4.beta3.el9.x86_64
pki-servlet-engine-9.0.50-1.el9.noarch
idm-pki-server-11.2.0-0.4.beta3.el9.noarch
idm-pki-acme-11.2.0-0.4.beta3.el9.noarch
idm-pki-ca-11.2.0-0.4.beta3.el9.noarch
idm-pki-kra-11.2.0-0.4.beta3.el9.noarch


How reproducible:
100%

Steps to Reproduce:
1. Install ipa from the above scratch build
2. echo Secret123 | kinit admin
3. ipa vault-add myvault --type standard
ipa: ERROR: an internal error has occurred


Actual results:
ipa: ERROR: an internal error has occurred

Expected results:


Additional info:



2022-06-23 14:10:59 [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-7] INFO: Request:
{
  "ClassName" : "com.netscape.certsrv.key.KeyArchivalRequest",
  "Attributes" : {
    "Attribute" : [ {
      "name" : "clientKeyID",
      "value" : "ipa:/users/admin/jmagne1000"
    }, {
      "name" : "dataType",
      "value" : "passPhrase"
    }, {
      "name" : "wrappedPrivateData",
      "value" : "IHgZUVeuNCotwEMjQbKuPQ=="
    }, {
      "name" : "transWrappedSessionKey",
      "value" : "XMcefjkfjh8Qok+RIZMqcWKUSvevfSxTgmk8D5b555V9kb3lpzxsyJsDsLs8osy97SY+L7WvsLFKrQBX1K2gLochvxkAGCOT1Rx/5vseEWu4gEEGB/JCPaUJrlTnVKlw+M8kkkcekWg+FFdUZ3gjshJi8CgNRhI8r9+HzU8SKe+Cx6E5Oic/wzUSGuQOk5RtDsfnYtyXOpXY1fdY8zulBpf6AbqG2kYhNd1P3v2W8kuc1AFyrfdJOSYBbifwJv7r28Ei+5LDiY3ZLDw0lN7DLkvC44nBzWXUG3Tg3utUZ2vPP/dcAzbrIAE1NZX9fMyLLs79/BOCJaBExLsMECd/7Q=="
    }, {
      "name" : "algorithmOID",
      "value" : "{2 16 840 1 101 3 4 1 2}"
    }, {
      "name" : "symmetricAlgorithmParams",
      "value" : "eTU1q5zpiPJTnlKUE6TvJw=="
    } ]
  }
}
2022-06-23 14:10:59 [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-7] INFO: KeyRequestDAO: Checking for key existence
2022-06-23 14:10:59 [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-7] INFO: KeyRequestDAO: - client key ID: ipa:/users/admin/jmagne1000
2022-06-23 14:10:59 [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-7] INFO: KeyRequestDAO: - status: active
2022-06-23 14:10:59 [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-7] INFO: KeyRequestDAO: - filter: (&(clientId=ipa:/users/admin/jmagne1000)(status=active))
2022-06-23 14:10:59 [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-7] FINE: LdapBoundConnFactory: getting a connection
2022-06-23 14:10:59 [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-7] FINE: LdapBoundConnFactory: master connection is connected: true
2022-06-23 14:10:59 [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-7] FINE: LdapBoundConnFactory: connection already connected: true
2022-06-23 14:10:59 [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-7] FINE: LdapBoundConnFactory: number of connections: 2
2022-06-23 14:10:59 [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-7] FINEST: Getting dbs.newSchemaEntryAdded=true
2022-06-23 14:10:59 [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-7] FINEST: Getting dbs.newSchemaEntryAdded=true
2022-06-23 14:10:59 [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-7] INFO: LDAPSession: Searching ou=keyRepository, ou=kra,o=kra,o=ipaca for (&(clientId=ipa:/users/admin/jmagne1000)(status=active))
2022-06-23 14:10:59 [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-7] FINE: LdapBoundConnFactory: number of connections: 3
2022-06-23 14:10:59 [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-7] INFO: KeyRequestDAO: Key does not exist
2022-06-23 14:10:59 [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-7] FINEST: Getting kra.ephemeralRequests=true
2022-06-23 14:10:59 [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-7] FINE: SignedAuditLogger: event RANDOM_GENERATION
2022-06-23 14:10:59 [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-7] FINEST: Getting kra.ephemeralRequests=true
2022-06-23 14:10:59 [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-7] FINE: SecurityDataProcessor.archive. Request id: 16560078593838057
2022-06-23 14:10:59 [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-7] FINE: SecurityDataProcessor.archive wrappedSecurityData: IHgZUVeuNCotwEMjQbKuPQ==
2022-06-23 14:10:59 [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-7] FINEST: Getting kra.allowEncDecrypt.archival=true
2022-06-23 14:10:59 [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-7] FINEST: Getting keyWrap.useOAEP=true
2022-06-23 14:10:59 [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-7] FINE: TransportKeyUnit.decryptExternalPrivate
2022-06-23 14:10:59 [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-7] FINE: SignedAuditLogger: event SECURITY_DATA_ARCHIVAL_REQUEST
2022-06-23 14:10:59 [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-7] FINEST: Getting pidDir=/var/run/pki/tomcat
2022-06-23 14:10:59 [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-7] FINEST: Getting pidDir=/var/run/pki/tomcat
2022-06-23 14:10:59 [ajp-nio-0:0:0:0:0:0:0:1-8009-exec-7] INFO: PKIExceptionMapper: Returning PKIException

Comment 20 errata-xmlrpc 2022-11-15 10:10:02 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 (jss bug fix and enhancement 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/RHEA-2022:8009

Comment 21 Red Hat Bugzilla 2023-09-18 04:40:09 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


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