Integrated: 8258753: StartTlsResponse.close() hangs due to synchronization issues
Prajwal Kumaraswamy
pkumaraswamy at openjdk.java.net
Thu Mar 25 03:38:41 UTC 2021
On Thu, 18 Mar 2021 07:07:56 GMT, Prajwal Kumaraswamy <pkumaraswamy at openjdk.org> wrote:
> **Scenario:**
> 1. Issue occurs in a muti-threaded environment where SSL socket read() and close() are invoked in parallel.
> 2. SSL socket read is already called.
> 2. close() calls waitForCloseNotify() -> decode() ->....-> socketRead0() to read the close_notify acknowledgment.
> 3. Since there is no synchronization between these read operations, the thread which had already invoked read(), reads the close_notify acknowledgment.
> 4. The thread (which calls waitForCloseNotify() -> read() ) waits indefinitely in socketRead0() and hangs.
> 5. Reproduced and tested the fix against a real time MS AD LDAP server.
This pull request has now been integrated.
Changeset: 41555332
Author: Prajwal Kumaraswamy <pkumaraswamy at openjdk.org>
Committer: Xue-Lei Andrew Fan <xuelei at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/41555332
Stats: 17 lines in 1 file changed: 8 ins; 2 del; 7 mod
8258753: StartTlsResponse.close() hangs due to synchronization issues
Reviewed-by: xuelei
-------------
PR: https://git.openjdk.java.net/jdk/pull/3068
More information about the security-dev
mailing list