RFR: 8273553: sun.security.ssl.SSLEngineImpl.closeInbound also has similar error of JDK-8253368
Bradford Wetmore
wetmore at openjdk.java.net
Wed Mar 23 16:48:24 UTC 2022
On Wed, 23 Mar 2022 15:10:21 GMT, Xue-Lei Andrew Fan <xuelei at openjdk.org> wrote:
>> src/java.base/share/classes/sun/security/ssl/SSLEngineImpl.java line 799:
>>
>>> 797: } finally {
>>> 798: conContext.closeInbound();
>>> 799: engineLock.unlock();
>>
>> I see that `onContext.closeInbound()` might throw, which would leave the `engineLock` locked and could cause deadlocks down the road. So maybe you should have a nested `try { } finally { }` here to make sure the lock is properly unlocked.
>
> +1.
Good catch. Thanks.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7796
More information about the security-dev
mailing list