Conversation
Per draft-ietf-webtrans-http3 section 4.3, a WEBTRANSPORT_STREAM frame is only allowed as the very first frame of a request stream. Receiving it on a stream which is already in use - such as a CONNECT stream - or after another frame must be treated as a connection error of type H3_FRAME_ERROR.
Author
|
Closing this one. Not taking it further. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A
WEBTRANSPORT_STREAMframe (0x41) is accepted on a CONNECT stream without validation, so sevenbytes on that stream turn the control channel into a WebTransport data stream.
h3/connection.pythen fires
WebTransportStreamDataReceivedwithstream_id=0, which is a stream the applicationnever agreed to treat as data. It was found by fuzzing, and the sequence is trivial to send.
The frame is only legal at the start of a stream, where it declares what the stream is. Arriving
after the stream has already carried a frame, it is reinterpreting a stream mid-flight, which the
spec does not allow.
Streams now track
received_frame, and aWEBTRANSPORT_STREAMon a stream that has already receivedone raises
FrameError, a newProtocolErrorcarryingH3_FRAME_ERROR. That is the code the specassigns to a frame that is invalid in its position, so the peer is told what was wrong rather than
seeing a generic failure, and the connection closes instead of the application receiving data on its
control channel.
Tests cover the reported byte sequence and a legitimate WebTransport stream, so the guard cannot pass
by refusing both.
Fixes #638