openssl: QUIC SERVER: Testing the http3 demo server with chrome produces unexpected errors

When testing my http3 (based on the demo/http3) when testing with chrome after 29512 requests I am getting the error: 4FC58266D7F0000:error:0A08010C:SSL routines:ossl_quic_reset:unsupported:ssl/quic/quic_impl.c:798

I have tracked it to: https://github.com/openssl/openssl/blob/feature/quic-server/ssl/quic/quic_record_tx.c#L666 According to my traces: qtx_write payload_len: 1196 needs_encrypt 1180 qtx_write pred_hdr_len: 5 payload_len: 1196 qtx_write FAILED 4 1201 1200 pred_hdr_len: 5 payload_len: 1196 qtx_write FAILED in qtx_mutate_write The error seems to occurs after PN is 29511 we have 1201 bytes to write and only space for 1200 😦

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 34 (34 by maintainers)

Commits related to this issue

Most upvoted comments

Do I understand right that in current code we use uninitalized value found in stream header, when calculating the size for streamId in header?

The streamId will not be uninitialized, but initialized to 0.

@nhorman Good catch! Perhaps the following patch should help?

diff --git a/ssl/quic/quic_txp.c b/ssl/quic/quic_txp.c
index 2532d1edcb..bbbb6a7045 100644
--- a/ssl/quic/quic_txp.c
+++ b/ssl/quic/quic_txp.c
@@ -2226,6 +2226,7 @@ static int txp_generate_stream_frames(OSSL_QUIC_TX_PACKETISER *txp,
             rc = 1;
             goto err;
         }
+        chunks[i].shdr.stream_id = id;
     }
 
     for (i = 0;; ++i) {
@@ -2339,7 +2340,6 @@ static int txp_generate_stream_frames(OSSL_QUIC_TX_PACKETISER *txp,
         if (wpkt == NULL)
             goto err; /* alloc error */
 
-        shdr->stream_id = id;
         if (!ossl_assert(ossl_quic_wire_encode_frame_stream_hdr(wpkt, shdr))) {
             /* (Should not be possible.) */
             tx_helper_rollback(h);