Bug 905128 - [CRASH] OpenJDK-1.7.0 while using NSS security provider and kerberos
[CRASH] OpenJDK-1.7.0 while using NSS security provider and kerberos
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: java-1.7.0-openjdk (Show other bugs)
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: Andrew John Hughes
Lukas Zachar
: ZStream
: 906325 907090 (view as bug list)
Depends On:
Blocks: 960054 831734 904766 998596
  Show dependency treegraph
Reported: 2013-01-28 11:31 EST by Alon Bar-Lev
Modified: 2013-11-21 06:12 EST (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-11-21 06:12:37 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
GSSAPITest.java (1.75 KB, text/x-java)
2013-01-28 11:31 EST, Alon Bar-Lev
no flags Details
krb5.conf (307 bytes, text/plain)
2013-01-28 11:33 EST, Alon Bar-Lev
no flags Details
jaas.conf (164 bytes, text/plain)
2013-01-28 11:34 EST, Alon Bar-Lev
no flags Details
hs_err_pid17595.log (36.76 KB, text/plain)
2013-01-28 11:35 EST, Alon Bar-Lev
no flags Details
Don't make an update call in doFinal for non-block ciphers (2.22 KB, patch)
2013-01-29 13:23 EST, Andrew John Hughes
no flags Details | Diff
Revised patch that checks blockBuffer rather than blockBufferLen (2.22 KB, patch)
2013-01-31 12:28 EST, Andrew John Hughes
no flags Details | Diff

  None (edit)
Description Alon Bar-Lev 2013-01-28 11:31:50 EST
Created attachment 689075 [details]

In the attempt to boost jre performance (bug#831734), kerberos JAAS is broken.

It causes SIGSEGV when trying to authenticate.

Attached a sample program to reproduce, logs.

Stack: [0x00007f268b227000,0x00007f268b328000],  sp=0x00007f268b324b10,  free space=1014k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x5d9e5f]  JNI_CreateJavaVM+0xd40f
C  [libj2pkcs11.so+0x6062]  Java_sun_security_pkcs11_wrapper_PKCS11_C_1EncryptUpdate+0xd2
j  sun.security.pkcs11.wrapper.PKCS11.C_EncryptUpdate(JJ[BIIJ[BII)I+0
j  sun.security.pkcs11.P11Cipher.implDoFinal([BII)I+115
j  sun.security.pkcs11.P11Cipher.engineDoFinal([BII[BI)I+44
j  sun.security.pkcs11.P11Cipher.engineDoFinal([BII)[B+16
j  javax.crypto.Cipher.doFinal([BII)[B+45
j  sun.security.krb5.internal.crypto.dk.ArcFourCrypto.encrypt([BI[B[B[BII)[B+175
j  sun.security.krb5.internal.crypto.ArcFourHmac.encrypt([BI[B[BII)[B+12
j  sun.security.krb5.internal.crypto.ArcFourHmacEType.encrypt([B[B[BI)[B+8
j  sun.security.krb5.internal.crypto.ArcFourHmacEType.encrypt([B[BI)[B+14
j  sun.security.krb5.EncryptedData.<init>(Lsun/security/krb5/EncryptionKey;[BI)V+22
j  sun.security.krb5.KrbAsReq.<init>(Lsun/security/krb5/EncryptionKey;Lsun/security/krb5/internal/KDCOptions;Lsun/security/krb5/PrincipalName;Lsun/security/krb5/PrincipalName;Lsun/security/krb5/internal/KerberosTime;Lsun/security/krb5/internal/KerberosTime;Lsun/security/krb5/internal/KerberosTime;[ILsun/security/krb5/internal/HostAddresses;)V+147

Red Hat Enterprise Linux Server release 6.4 Beta (Santiago)

Comment 1 Alon Bar-Lev 2013-01-28 11:32:29 EST
Comment on attachment 689075 [details]

Sample program.
Comment 2 Alon Bar-Lev 2013-01-28 11:33:50 EST
Created attachment 689076 [details]
Comment 3 Alon Bar-Lev 2013-01-28 11:34:13 EST
Created attachment 689077 [details]
Comment 4 Alon Bar-Lev 2013-01-28 11:35:04 EST
Created attachment 689096 [details]

Comment 5 Alon Bar-Lev 2013-01-28 11:36:55 EST
Workaround: Revert to the default java security provider.
Comment 7 Alon Bar-Lev 2013-01-28 11:46:54 EST
Unrelated note:

Settings of jvm should be the defaults of openjdk settings.

Applications/administrators that wish to boost their performance can actively load security provider of their choice.

Changing the system width configuration of jvm and effecting all applications should have been avoided.
Comment 8 Andrew John Hughes 2013-01-29 13:21:55 EST
It seems the TCK doesn't really test non-block ciphers throughly.  The fix is fairly trivial; just a state that wasn't fully accounted for.
Comment 9 Andrew John Hughes 2013-01-29 13:23:04 EST
Created attachment 689985 [details]
Don't make an update call in doFinal for non-block ciphers
Comment 10 Deepak Bhole 2013-01-29 13:25:13 EST
We have reverted the errata which should make RHEV work again (with the version in 6.3.z/older 6.4 composes).
Comment 13 RHEL Product and Program Management 2013-01-29 13:49:41 EST
This request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux release.  Product
Management has requested further review of this request by
Red Hat Engineering, for potential inclusion in a Red Hat
Enterprise Linux release for currently deployed products.
This request is not yet committed for inclusion in a release.
Comment 14 Yaniv Kaul 2013-01-31 08:30:58 EST
*** Bug 906325 has been marked as a duplicate of this bug. ***
Comment 15 Andrew John Hughes 2013-01-31 12:28:44 EST
Created attachment 691121 [details]
Revised patch that checks blockBuffer rather than blockBufferLen

It turns out some TCK tests started failing because there are valid cases with an empty block buffer.  So we test for the actual failure case (no blockBuffer at all) rather than trying to be clever.
Comment 16 Deepak Bhole 2013-02-14 16:10:33 EST
*** Bug 907090 has been marked as a duplicate of this bug. ***
Comment 24 Barak 2013-05-30 09:08:53 EDT
Replacing the openJdk rpm on a 6.4 host with a 6.5 build might create a lot of none relevant noise.

However if we get a 6.4 (somwhat stable build) we can give it a quick test.

BTW the right way to test it is:

1. install vanilla rhel-XXX
   - make sure the new openJdk is installed
2. install ovirt-engine
3. join a domain
4. login
Comment 31 errata-xmlrpc 2013-11-21 06:12:37 EST
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, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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