Bug 2094027

Summary: SunEC runtime permission for FIPS [rhel-8, openjdk-17]
Product: Red Hat Enterprise Linux 8 Reporter: Martin Balao <mbalao>
Component: java-17-openjdkAssignee: Martin Balao <mbalao>
Status: CLOSED ERRATA QA Contact: OpenJDK QA <java-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 8.6CC: ahughes, fferrari, jandrlik, jvanek, toneata
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: java-17-openjdk-17.0.3.0.7-2.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2108209 2108210 2128101 (view as bug list) Environment:
Last Closed: 2022-11-08 09:30:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2108209, 2108210, 2128101, 2129199, 2156945    

Description Martin Balao 2022-06-06 15:36:46 UTC
The module jdk.crypto.ec is not granted permission to access the package jdk.internal.access in java.base (java.lang.RuntimePermission "accessClassInPackage.jdk.internal.access"). Under the presence of a Security Manager, any such access throws a security exception. The reason why jdk.crypto.ec needs access is legitimate: determining if OpenJDK is configured in FIPS mode. A similar bug involving the module jdk.crypto.cryptoki has been fixed before [1].

The patch to fix this issue has been authored by @Severin Gehwolf and successfully tested after inclusion in portable builds of java-17-openjdk [2].

--
[1] - https://bugzilla.redhat.com/show_bug.cgi?id=1996182
[2] - http://pkgs.devel.redhat.com/cgit/rpms/java-17-openjdk/commit/java-17-openjdk.spec?h=openjdk-portable-rhel-7&id=d8ffcb9d1ae06c139786858b114bd19c9359220e

Comment 1 Martin Balao 2022-06-06 17:36:42 UTC
PR: https://github.com/rh-openjdk/jdk/pull/5

Comment 2 Martin Balao 2022-06-08 19:15:38 UTC
The PR has been merged here: https://github.com/rh-openjdk/jdk/commit/da9988cfccc9c974a917c8540bd5aac04197b046

Comment 10 errata-xmlrpc 2022-11-08 09:30:31 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-17-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/RHBA-2022:6691