Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

google/conscrypt
master @ 4311870
8
Fixes
0
CVEs
HIGH
Peak severity
37.5%
Coverage
Highlights
Memory Corruption: 2 prior fixes. Scrutinize any change in this area.
common/src/jni/main/cpp/conscrypt/native_crypto.cc: most-fixed (2 issues). Treat as high-risk during review.
2 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Memory Corruption: Overlapping input and output byte arrays during AEAD cipher operations (like AES/GCM) can bypass safety bounds and trigger memory corruption or undefined behavior in the underlying native BoringSSL layer. Safe cloning and path canonicalization are necessary to prevent offset confusion.
Buffer Overflow: Declaring JNI-level buffers with incorrect dimensions (such as utilizing signature size instead of public key size) can result in a heap or stack buffer overflow inside NativeCrypto operations. Strict coordination between Java public key sizes and JNI buffer initializations is vital.
Insecure Deserialization: Java's native object deserialization (readObject) can load serialized keys with invalid sizes, which are later passed to native crypto bindings, resulting in memory corruption or crashes. Key validation must happen eagerly during deserialization.