Skip to content

Commit

Permalink
QUIC CONFORMANCE: RFC 9000 s. 19.14: STREAMS_BLOCKED Frames
Browse files Browse the repository at this point in the history
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from #21135)
  • Loading branch information
hlandau authored and paulidale committed Jul 16, 2023
1 parent f084a8f commit f80e61b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions ssl/quic/quic_rx_depack.c
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,20 @@ static int depack_do_frame_streams_blocked(PACKET *pkt,
/* This frame makes the packet ACK eliciting */
ackm_data->is_ack_eliciting = 1;

if (max_data > (((uint64_t)1) << 60)) {
/*
* RFC 9000 s. 19.14: "This value cannot exceed 2**60, as it is not
* possible to encode stream IDs larger than 2**62 - 1. Receipt of a
* frame that encodes a larger stream ID MUST be treated as a connection
* error of type STREAM_LIMIT_ERROR or FRAME_ENCODING_ERROR."
*/
ossl_quic_channel_raise_protocol_error(ch,
QUIC_ERR_STREAM_LIMIT_ERROR,
frame_type,
"invalid stream count limit");
return 0;
}

/* No-op - informative/debugging frame. */
return 1;
}
Expand Down

0 comments on commit f80e61b

Please sign in to comment.