RFR: 8290005: com/sun/jndi/ldap/LdapCBPropertiesTest.java failling with NullPointerException [v4]

Jamil Nimeh jnimeh at openjdk.org
Fri Jun 16 15:01:09 UTC 2023


On Fri, 16 Jun 2023 14:52:44 GMT, Xue-Lei Andrew Fan <xuelei at openjdk.org> wrote:

>> There is a difference, though. The close() method in SSLSocketImpl is not synchronized and there is the chance of a NullPointerException in duplexCloseOutput() because `conContext.handshakeContext` is being set to null by the TransportContext class in a different thread. I think that can affect any method in SSLSocketImpl that accesses that field.
>
> Yes, socket close is a headache problem for me.

There's a bit of a history with SSLSocket closures since the new handshaker was brought into JDK11.  Some of it dealt with synchronization, others with properly handling full vs. half-duplex closes.  You may want to look up some of the bug history on changes surrounding the SSLSocket closures just to make sure we don't undo any fixes that were previously integrated.  As Xuelei's comment indicates, this is a delicate part of the handshaker.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13742#discussion_r1232367902



More information about the security-dev mailing list