Repository navigation
quic: fix abort on handshake failure in connect() - #67617
Open
christianaurichzm wants to merge 1 commit into
Open
christianaurichzm wants to merge 1 commit into
christianaurichzm wants to merge 1 commit into
Conversation
Endpoint::Connect() marked the session as wrapped before sending the first flight, while JavaScript had no QuicSession for it yet. If the session closed during that send, for example with ciphers: '', nothing called destroy() and the CHECK in Session::EmitClose() aborted the process. Send the first flight before marking the session as wrapped, so connect() rejects with ERR_QUIC_CONNECTION_FAILED instead. Signed-off-by: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
Collaborator
|
Review requested:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #67617 +/- ##
==========================================
- Coverage 90.72% 90.71% -0.02%
==========================================
Files 801 801
Lines 280809 280809
Branches 54212 54211 -1
==========================================
- Hits 254776 254745 -31
- Misses 16209 16248 +39
+ Partials 9824 9816 -8 🚀 New features to boost your workflow:
|
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.
quic.connect()aborts the process when the handshake fails beforeconnect()returns, for example with an empty cipher list:Endpoint::Connect()marks the session as wrapped and only then sends the first flight. If the session closes during that send, the close is emitted to JavaScript before theQuicSessionexists, and nothing callsdestroy().groups: ''andhandshakeTimeout: 0hit the same path. This sends the first flight before marking the session as wrapped, soconnect()rejects withERR_QUIC_CONNECTION_FAILEDinstead.