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 1929465 - Improve system FIPS detection [java-11-openjdk, RHEL 8]
Summary: Improve system FIPS detection [java-11-openjdk, RHEL 8]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: java-11-openjdk
Version: 8.4
Hardware: All
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Martin Balao
QA Contact: OpenJDK QA
URL:
Whiteboard:
Depends On:
Blocks: 2014199
TreeView+ depends on / blocked
 
Reported: 2021-02-17 01:11 UTC by Martin Balao
Modified: 2022-05-16 22:42 UTC (History)
10 users (show)

Fixed In Version: java-11-openjdk-11.0.11.0.9-4.el8
Doc Type: Bug Fix
Doc Text:
Previously, OpenJDK's FIPS mode would be enabled if it detected that the system crypto policy was set to FIPS. This meant that containers running on a FIPS mode kernel would not enable FIPS mode without the crypto policy being changed. With this update, OpenJDK queries the NSS library as to whether FIPS mode is active or not.
Clone Of:
: 2014199 (view as bug list)
Environment:
Last Closed: 2021-11-09 17:48:33 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 5916331 0 None None None 2021-03-30 15:53:51 UTC
Red Hat Product Errata RHEA-2021:3863 0 None None None 2021-11-09 17:49:01 UTC

Description Martin Balao 2021-02-17 01:11:24 UTC
Description of problem:

OpenJDK needs to detect whether it is running on a FIPS-configured RHEL system or not at startup in order to make automatic configurations. Please note that this default behavior can be explicitly disabled by the user through the com.redhat.fips system property (i.e.: -Dcom.redhat.fips=false); or, more indirectly, through the java.security.disableSystemPropertiesFile system property (i.e.: -Djava.security.disableSystemPropertiesFile=true) or the security.useSystemPropertiesFile security property (i.e.: security.useSystemPropertiesFile=false).

To detect if the system is in FIPS mode, OpenJDK is reading the /etc/crypto-policies/config configuration file and looking for a line containing 'FIPS' only. This is an internal and non-supported API, known to be failing in these cases: 1) in Common Criteria systems (FIPS with additional constraints) such line is 'FIPS:OSPP'; and 2) in FIPS-configured containers, the value may not reflect the applicable configuration. Given that this API is not supported, there is a high risk that more cases begin to fail in the future -eventually, every case-.

As a result, OpenJDK needs to change the way in which detects if the systems is in FIPS mode by using a supported API. The preferred API is NSS's SECMOD_GetSystemFIPSEnabled function. /proc/sys/crypto/fips_enabled may be used as a fallback scheme -libraries in RHEL 9 are moving to it-.

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

RHEL 8.3, 8.4

How reproducible:

Always.

Steps to Reproduce:
1. Deploy an OpenJDK container in a FIPS-configured RHEL OR deploy OpenJDK on a Common Criteria configured RHEL
2. Check the list of security providers enabled in OpenJDK

Actual results:

Number of providers: 12
Provider: SUN version 11
Provider: SunRsaSign version 11
Provider: SunEC version 11
Provider: SunJSSE version 11
Provider: SunJCE version 11
Provider: SunJGSS version 11
Provider: SunSASL version 11
Provider: XMLDSig version 11
Provider: SunPCSC version 11
Provider: JdkLDAP version 11
Provider: JdkSASL version 11
Provider: SunPKCS11 version 11

Expected results:

Number of providers: 4
Provider: SunPKCS11-NSS-FIPS version 11
Provider: SUN version 11
Provider: SunEC version 11
Provider: SunJSSE version 11

Additional info:

-

Comment 20 jiri vanek 2021-06-30 13:24:20 UTC
New build had passed all fips and non fips tests

Comment 24 errata-xmlrpc 2021-11-09 17:48:33 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 (java-11-openjdk 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-2021:3863


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