-
Bug
-
Resolution: Fixed
-
P3
-
8u73, 9
-
b128
-
x86_64
-
linux
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8247709 | openjdk8u272 | Vyom Tewari | P3 | Resolved | Fixed | b01 |
JDK-8245092 | 8u271 | Fisba Samreen | P3 | Resolved | Fixed | b01 |
JDK-8248440 | 8u261 | Vyom Tewari | P3 | Resolved | Fixed | b31 |
JDK-8245990 | 8u251 | Vyom Tewari | P3 | Closed | Fixed | b35 |
JDK-8251663 | emb-8u271 | Vyom Tewari | P3 | Resolved | Fixed | team |
FULL PRODUCT VERSION :
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux daisy.blackducksoftware.com 2.6.32-573.12.1.el6.x86_64 #1 SMP Tue Dec 15 21:19:08 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
and other Linux variants
A DESCRIPTION OF THE PROBLEM :
Attempting to create a connection to an NTLM proxy fails with a NullPointerException from the JRE.
NTLM Client: Type 1 created
0000: 4E 54 4C 4D 53 53 50 00 01 00 00 00 07 82 08 00 NTLMSSP.........
0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
NTLM Client: Type 2 received
0000: 4E 54 4C 4D 53 53 50 00 02 00 00 00 00 00 00 00 NTLMSSP.........
0010: 00 00 00 00 05 82 89 00 0B 87 81 B6 2D 6E 8B C1 ............-n..
0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
java.lang.RuntimeException: java.lang.NullPointerException
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1455)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2979)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:489)
at com.blackduck.proxy.TestProxyHttpUrlConnection.connect(TestProxyHttpUrlConnection.java:43)
at com.blackduck.proxy.TestProxyHttpUrlConnection.main(TestProxyHttpUrlConnection.java:31)
Caused by: java.lang.NullPointerException
at com.sun.security.ntlm.Client.type3(Client.java:161)
at sun.net.www.protocol.http.ntlm.NTLMAuthentication.buildType3Msg(NTLMAuthentication.java:241)
at sun.net.www.protocol.http.ntlm.NTLMAuthentication.setHeaders(NTLMAuthentication.java:216)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1607)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
... 2 more
Inspecting the code Client.type3() assumes that NTLM.readSecurityBuffer will never return null, but it will return null if the optional target information is not present.
REGRESSION. Last worked in version 7u80
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Connect to an http proxy that returns NTLM challenge data shown above.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The connection attempt should succeed if valid credentials are supplied.
ACTUAL -
NullPointerException
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.lang.RuntimeException: java.lang.NullPointerException
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1455)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2979)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:489)
at com.blackduck.proxy.TestProxyHttpUrlConnection.connect(TestProxyHttpUrlConnection.java:43)
at com.blackduck.proxy.TestProxyHttpUrlConnection.main(TestProxyHttpUrlConnection.java:31)
Caused by: java.lang.NullPointerException
at com.sun.security.ntlm.Client.type3(Client.java:161)
at sun.net.www.protocol.http.ntlm.NTLMAuthentication.buildType3Msg(NTLMAuthentication.java:241)
at sun.net.www.protocol.http.ntlm.NTLMAuthentication.setHeaders(NTLMAuthentication.java:216)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1607)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
... 2 more
REPRODUCIBILITY :
This bug can be reproduced always.
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux daisy.blackducksoftware.com 2.6.32-573.12.1.el6.x86_64 #1 SMP Tue Dec 15 21:19:08 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
and other Linux variants
A DESCRIPTION OF THE PROBLEM :
Attempting to create a connection to an NTLM proxy fails with a NullPointerException from the JRE.
NTLM Client: Type 1 created
0000: 4E 54 4C 4D 53 53 50 00 01 00 00 00 07 82 08 00 NTLMSSP.........
0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
NTLM Client: Type 2 received
0000: 4E 54 4C 4D 53 53 50 00 02 00 00 00 00 00 00 00 NTLMSSP.........
0010: 00 00 00 00 05 82 89 00 0B 87 81 B6 2D 6E 8B C1 ............-n..
0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
java.lang.RuntimeException: java.lang.NullPointerException
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1455)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2979)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:489)
at com.blackduck.proxy.TestProxyHttpUrlConnection.connect(TestProxyHttpUrlConnection.java:43)
at com.blackduck.proxy.TestProxyHttpUrlConnection.main(TestProxyHttpUrlConnection.java:31)
Caused by: java.lang.NullPointerException
at com.sun.security.ntlm.Client.type3(Client.java:161)
at sun.net.www.protocol.http.ntlm.NTLMAuthentication.buildType3Msg(NTLMAuthentication.java:241)
at sun.net.www.protocol.http.ntlm.NTLMAuthentication.setHeaders(NTLMAuthentication.java:216)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1607)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
... 2 more
Inspecting the code Client.type3() assumes that NTLM.readSecurityBuffer will never return null, but it will return null if the optional target information is not present.
REGRESSION. Last worked in version 7u80
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Connect to an http proxy that returns NTLM challenge data shown above.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The connection attempt should succeed if valid credentials are supplied.
ACTUAL -
NullPointerException
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.lang.RuntimeException: java.lang.NullPointerException
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1455)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2979)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:489)
at com.blackduck.proxy.TestProxyHttpUrlConnection.connect(TestProxyHttpUrlConnection.java:43)
at com.blackduck.proxy.TestProxyHttpUrlConnection.main(TestProxyHttpUrlConnection.java:31)
Caused by: java.lang.NullPointerException
at com.sun.security.ntlm.Client.type3(Client.java:161)
at sun.net.www.protocol.http.ntlm.NTLMAuthentication.buildType3Msg(NTLMAuthentication.java:241)
at sun.net.www.protocol.http.ntlm.NTLMAuthentication.setHeaders(NTLMAuthentication.java:216)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1607)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
... 2 more
REPRODUCIBILITY :
This bug can be reproduced always.
- backported by
-
JDK-8245092 NullPointerException from ntlm.Client.type3
-
- Resolved
-
-
JDK-8247709 NullPointerException from ntlm.Client.type3
-
- Resolved
-
-
JDK-8248440 NullPointerException from ntlm.Client.type3
-
- Resolved
-
-
JDK-8251663 NullPointerException from ntlm.Client.type3
-
- Resolved
-
-
JDK-8245990 NullPointerException from ntlm.Client.type3
-
- Closed
-