BUFFER_OVERFLOW on wrap inconsistent with getPacketBufferSize

Đang mở
#1,049 4 bình luận 0 reaction 1 người được giao Xem trên GitHub

@dario-weswit đang làm issue này rồi.

Từ ngày 15/1/2023.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

Hello,

I'm testing Conscrypt 2.5.2 on the server side and I set setUseSessionTickets(sslEngine, true).
Some connections work well, but in some cases, even though the handshake succeeds, upon a later wrap I get BUFFER_OVERFLOW.
The problem is that, by later invoking getPacketBufferSize, I see that the buffer was sized accordingly, at 16709 bytes (and it was empty).
If I try doubling the buffer, the wrap works and the buffer reports 17408 bytes of data.

My suspect is that the involved operation is the production of the NewSessionTicket packet.
What I see is that the input buffer to wrap is about 90KB and wrap consumes 16384 bytes.
So, perhaps the native part returns the encrypted bytes together with the NewSessionTicket packet and this breaks the 16709 limit.

It may be difficult for me to provide a test case; please clarify if you need other specific details on the interaction.
However, I see that getPacketBufferSize always returns a constant, so it must rely on this limit to be always obeyed by the underlying native implementation.
Moreover, it seems that there is no cross-check on the size of the data received from the native part against this constant.
So, this seems like an internal inconsistency.

Ngôn ngữ chính
Java
Star
1.4k
Fork
332
Merge trung bình
2 ngày 56 phút
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của google/conscrypt

Tất cả issue của google/conscrypt

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.