-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(transport): handle out-of-order frame on remote init stream #2358
Conversation
Failed Interop TestsQUIC Interop Runner, client vs. server, differences relative to 7f8136e. neqo-latest as client
neqo-latest as server
All resultsSucceeded Interop TestsQUIC Interop Runner, client vs. server neqo-latest as client
neqo-latest as server
Unsupported Interop TestsQUIC Interop Runner, client vs. server neqo-latest as client
neqo-latest as server
|
e83fccb
to
cea9872
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2358 +/- ##
==========================================
- Coverage 95.29% 95.29% -0.01%
==========================================
Files 114 114
Lines 36850 36856 +6
Branches 36850 36856 +6
==========================================
+ Hits 35117 35122 +5
- Misses 1727 1728 +1
Partials 6 6 ☔ View full report in Codecov by Sentry. |
cea9872
to
cc68683
Compare
mozilla#2269 made a "stream control or data frame for a stream that is ours to initiate but we haven't yet" illegal. ``` rust let existed = !stream_id.is_remote_initiated(self.role) && self.local_stream_limits[stream_id.stream_type()].used() > stream_id.index(); ``` Problem is, when `is_remote_initiated` is `true`, then `existed` is `false`, which leads to a false positive for remote initiated streams.
cc68683
to
78cf868
Compare
Updated PR description and added a unit test. @larseggert can you take another look? |
#2269 made a "stream control or data frame for a stream that is ours to initiate but we haven't yet" illegal.
neqo/neqo-transport/src/streams.rs
Lines 409 to 424 in 7bbf900
Given a remote initiated stream that has been closed and forgotten since. Say that the local node receives an out-of-order frame on said forgotten stream. In such scenario:
stream_id.is_remote_initiated
istrue
existed
isfalse
ss.is_none()
andrs.is_none()
istrue
ss.is_none() && rs.is_none() && !existed
istrue
obtain_stream
falsely returnsErr(Error::StreamStateError);
This commit fixes the above issue, only returning
Err(Error::StreamStateError);
on locally initiated streams.