eclipse-openj9 / openj9

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.28k stars 720 forks source link

FIPS sun/security/krb5/etype/WeakCrypto.java IllegalArgumentException: EncryptionKey: Key bytes cannot be null! #17792

Open JasonFengJ9 opened 1 year ago

JasonFengJ9 commented 1 year ago

Failure link

From an internal build(rhel8x64-fips3-1):

openjdk version "11.0.20" 2023-07-18
IBM Semeru Runtime Open Edition 11.0.20.0-m2 (build 11.0.20+7)
Eclipse OpenJ9 VM 11.0.20.0-m2 (build v0.40.0-release-6eed0535c, JRE 11 Linux amd64-64-Bit Compressed References 20230628_784 (JIT enabled, AOT enabled)
OpenJ9   - 6eed0535c
OMR      - e80bff83b
JCL      - 20e0e53157 based on jdk-11.0.20+7)

Rerun in Grinder - Change TARGET to run only the failed test targets.

Optional info

Failure output (captured from console output)

[2023-07-12T16:15:01.782Z] variation: Mode650
[2023-07-12T16:15:01.782Z] JVM_OPTIONS:  -XX:-UseCompressedOops  -Dsemeru.fips=true

[2023-07-12T16:15:28.160Z] TEST: sun/security/krb5/etype/WeakCrypto.java

[2023-07-12T16:15:28.161Z] STDERR:
[2023-07-12T16:15:28.161Z] java.lang.IllegalArgumentException: EncryptionKey: Key bytes cannot be null!
[2023-07-12T16:15:28.161Z]  at java.security.jgss/sun.security.krb5.EncryptionKey.<init>(EncryptionKey.java:208)
[2023-07-12T16:15:28.161Z]  at java.security.jgss/sun.security.krb5.EncryptionKey.acquireSecretKeys(EncryptionKey.java:186)
[2023-07-12T16:15:28.161Z]  at WeakCrypto.main(WeakCrypto.java:74)
[2023-07-12T16:15:28.161Z]  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2023-07-12T16:15:28.161Z]  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[2023-07-12T16:15:28.161Z]  at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2023-07-12T16:15:28.161Z]  at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[2023-07-12T16:15:28.161Z]  at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
[2023-07-12T16:15:28.161Z]  at java.base/java.lang.Thread.run(Thread.java:839)
[2023-07-12T16:15:28.161Z] 
[2023-07-12T16:15:28.161Z] JavaTest Message: Test threw exception: java.lang.IllegalArgumentException: EncryptionKey: Key bytes cannot be null!

[2023-07-12T16:15:28.162Z] TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.IllegalArgumentException: EncryptionKey: Key bytes cannot be null!
[2023-07-12T16:15:28.162Z] --------------------------------------------------
[2023-07-12T16:15:28.162Z] Test results: passed: 49; failed: 1
[2023-07-12T16:15:42.814Z] Report written to /home/jenkins/workspace/Test_openjdk11_j9_sanity.openjdk_x86-64_linux_fips_testList_0/aqa-tests/TKG/output_16891780503301/jdk_security4_1/report/html/report.html
[2023-07-12T16:15:42.814Z] Results written to /home/jenkins/workspace/Test_openjdk11_j9_sanity.openjdk_x86-64_linux_fips_testList_0/aqa-tests/TKG/output_16891780503301/jdk_security4_1/work
[2023-07-12T16:15:42.814Z] Error: Some tests failed or other problems occurred.
[2023-07-12T16:15:42.814Z] -----------------------------------
[2023-07-12T16:15:42.814Z] jdk_security4_1_FAILED

50x internal grinder - all failed

JasonFengJ9 commented 1 year ago

FIPS JDK11 x86-64_linux

[2023-07-19T21:41:12.359Z] variation: Mode150
[2023-07-19T21:41:12.359Z] JVM_OPTIONS:  -XX:+UseCompressedOops  -Dsemeru.fips=true

[2023-07-19T21:41:36.871Z] TEST: sun/security/krb5/etype/WeakCrypto.java

[2023-07-19T21:41:36.872Z] STDERR:
[2023-07-19T21:41:36.872Z] java.lang.IllegalArgumentException: EncryptionKey: Key bytes cannot be null!
[2023-07-19T21:41:36.872Z]  at java.security.jgss/sun.security.krb5.EncryptionKey.<init>(EncryptionKey.java:208)
[2023-07-19T21:41:36.872Z]  at java.security.jgss/sun.security.krb5.EncryptionKey.acquireSecretKeys(EncryptionKey.java:186)
[2023-07-19T21:41:36.872Z]  at WeakCrypto.main(WeakCrypto.java:74)

[2023-07-19T21:41:36.872Z] TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.IllegalArgumentException: EncryptionKey: Key bytes cannot be null!
[2023-07-19T21:41:36.872Z] --------------------------------------------------
[2023-07-19T21:41:37.435Z] Test results: passed: 49; failed: 1
[2023-07-19T21:41:51.944Z] Report written to /home/jenkins/workspace/Test_openjdk11_j9_sanity.openjdk_x86-64_linux_fips_testList_0/aqa-tests/TKG/output_1689802042214/jdk_security4_0/report/html/report.html
[2023-07-19T21:41:51.944Z] Results written to /home/jenkins/workspace/Test_openjdk11_j9_sanity.openjdk_x86-64_linux_fips_testList_0/aqa-tests/TKG/output_1689802042214/jdk_security4_0/work
[2023-07-19T21:41:51.944Z] Error: Some tests failed or other problems occurred.
[2023-07-19T21:41:51.944Z] -----------------------------------
[2023-07-19T21:41:51.944Z] jdk_security4_0_FAILED
JasonFengJ9 commented 1 year ago

FIPS JDK8 x86-64_linux_fips140_2 0.41 milestone 1(rhel8x64-fips5-1)

[2023-09-06T19:40:46.310Z] variation: Mode150
[2023-09-06T19:40:46.310Z] JVM_OPTIONS:  -XX:+UseCompressedOops  -Dsemeru.fips=true

openjdk version "1.8.0_392"
IBM Semeru Runtime Open Edition (build 1.8.0_392-b03)
Eclipse OpenJ9 VM (build v0.41.0-release-87d042a68, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20230906_749 (JIT enabled, AOT enabled)
OpenJ9   - 87d042a68
OMR      - fa7b6ddc7
JCL      - 04ddaa8f70 based on jdk8u392-b03)

[2023-09-06T19:40:55.835Z] TEST: sun/security/krb5/etype/WeakCrypto.java

[2023-09-06T19:40:55.835Z] STDERR:
[2023-09-06T19:40:55.835Z] java.lang.IllegalArgumentException: EncryptionKey: Key bytes cannot be null!
[2023-09-06T19:40:55.835Z]  at sun.security.krb5.EncryptionKey.<init>(EncryptionKey.java:208)
[2023-09-06T19:40:55.835Z]  at sun.security.krb5.EncryptionKey.acquireSecretKeys(EncryptionKey.java:186)
[2023-09-06T19:40:55.835Z]  at WeakCrypto.main(WeakCrypto.java:72)
[2023-09-06T19:40:55.835Z]  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2023-09-06T19:40:55.835Z]  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[2023-09-06T19:40:55.835Z]  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2023-09-06T19:40:55.835Z]  at java.lang.reflect.Method.invoke(Method.java:498)
[2023-09-06T19:40:55.835Z]  at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
[2023-09-06T19:40:55.835Z]  at java.lang.Thread.run(Thread.java:826)
[2023-09-06T19:40:55.835Z] 
[2023-09-06T19:40:55.835Z] JavaTest Message: Test threw exception: java.lang.IllegalArgumentException: EncryptionKey: Key bytes cannot be null!

[2023-09-06T19:41:07.799Z] jdk_security4_0_FAILED
llxia commented 1 year ago

@jasonkatonica if this is not going to be looked at any time soon, could we temporarily exclude the tests? Thanks

JasonFengJ9 commented 1 year ago

FIPS JDK8 x86-64_linux_fips140_2