You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "gagandhakrey (via GitHub)" <gi...@apache.org> on 2026/04/05 09:03:04 UTC
[PR] Fix native memory leak in SSLFactory cache and resolve buffer offset corruption in EncryptionUtils [cassandra]
gagandhakrey opened a new pull request, #4706:
URL: https://github.com/apache/cassandra/pull/4706
## Description
- **SSLFactory.java**: Added `ReferenceCountUtil.release()` on eviction from the Netty `SslContext` cache to prevent a native memory leak (unmanaged tcnative/OpenSSL SSL_CTX leak).
- **EncryptionUtils.java**: Fixed `DataInputReadChannel.read` to properly evaluate the `dst.arrayOffset()` instead of writing directly to `dst.array()`. Fixed `ReadableByteChannel` contract violation by ensuring `dst.position()` is advanced by `readLength`.
This PR guarantees active connections seamlessly finish while explicitly addressing and terminating the native refcounted leak without incurring double-releases.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org