-
Bug
-
Resolution: Fixed
-
P4
-
6u31, 7
-
b36
-
x86
-
generic, windows_xp
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8018979 | 7u45 | Weijun Wang | P4 | Closed | Fixed | b01 |
JDK-2230557 | 7u40 | Weijun Wang | P4 | Closed | Fixed | b01 |
JDK-2230616 | 6u60 | Mala Bankal | P3 | Closed | Fixed | b01 |
FULL PRODUCT VERSION :
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
Trying to invoke login with Krb5LoginModule, debug=false, doNotPrompt=true, useTicketCache=true, storeKey=false.
When an empty file krb5cc_<username> in <userhome> exists, this throws a NullPointerException in sun.security.krb5.Credentials.acquireDefaultCreds().
The cause is the following code:
if (cache == null) {
cache = CredentialsCache.getInstance();
}
if (cache != null) {
if (DEBUG) {
System.out.println(">>> KrbCreds found the default ticket " +
"granting ticket in credential cache.");
}
sun.security.krb5.internal.ccache.Credentials temp =
cache.getDefaultCreds();
if (EType.isSupported(temp.getEType())) {
result = temp.setKrbCreds();
} else {
if (DEBUG) {
System.out.println(
">>> unsupported key type found the default TGT: " +
temp.getEType());
}
}
}
where cache.getDefaultCreds() can and will return null in case the ticket cache is empty, so the EType.isSupported(...) fails.
REPRODUCIBILITY :
This bug can be reproduced always.
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
Trying to invoke login with Krb5LoginModule, debug=false, doNotPrompt=true, useTicketCache=true, storeKey=false.
When an empty file krb5cc_<username> in <userhome> exists, this throws a NullPointerException in sun.security.krb5.Credentials.acquireDefaultCreds().
The cause is the following code:
if (cache == null) {
cache = CredentialsCache.getInstance();
}
if (cache != null) {
if (DEBUG) {
System.out.println(">>> KrbCreds found the default ticket " +
"granting ticket in credential cache.");
}
sun.security.krb5.internal.ccache.Credentials temp =
cache.getDefaultCreds();
if (EType.isSupported(temp.getEType())) {
result = temp.setKrbCreds();
} else {
if (DEBUG) {
System.out.println(
">>> unsupported key type found the default TGT: " +
temp.getEType());
}
}
}
where cache.getDefaultCreds() can and will return null in case the ticket cache is empty, so the EType.isSupported(...) fails.
REPRODUCIBILITY :
This bug can be reproduced always.
- backported by
-
JDK-2230616 NPE in sun.security.krb5.Credentials.acquireDefaultCreds()
-
- Closed
-
-
JDK-2230557 NPE in sun.security.krb5.Credentials.acquireDefaultCreds()
-
- Closed
-
-
JDK-8018979 NPE in sun.security.krb5.Credentials.acquireDefaultCreds()
-
- Closed
-
- duplicates
-
JDK-8029175 NPE in Credentials.acquireTGTFromCache()
-
- Closed
-