Skip to content
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

STREAM_ATTACH needs a STREAM_ATTACH_ACK #23

Open
frochet opened this issue Jan 15, 2021 · 2 comments
Open

STREAM_ATTACH needs a STREAM_ATTACH_ACK #23

frochet opened this issue Jan 15, 2021 · 2 comments
Labels

Comments

@frochet
Copy link
Member

frochet commented Jan 15, 2021

if multiple stream_attach are sent at the same time through different TCP connections, and those stream_attach share the same cryptographic context, then the peer may receive the wrong order of stream_attach records and fail the decryption.

authorizing one stream_attach per cryptographic context in fly would fix the issue

@mpiraux
Copy link
Member

mpiraux commented May 19, 2021

if multiple stream_attach are sent at the same time through different TCP connections, and those stream_attach share the same cryptographic context

You mean if those STREAM_ATTACH are sent over a given stream split over several TCP connections ?

@mpiraux mpiraux added the design label May 19, 2021
@frochet
Copy link
Member Author

frochet commented May 19, 2021

No. You may have N TCP connections, and N stream creations going on at the same time. Let's assume those N TCP connections are fresh, and the TCPLS handshakes (the main one, and the JOIN ones) just finished. You may have a Stream creation message going on in parallel over all TCP connection. Since those messages use the same cryptographic context (there is only one at this stage), they must be processed in the same order as sent. Which is not the case currently. You may get the wrong order on the receiver side.

This bug might be fixed by adding a STREAM_ATTACH_ACK, and sending stream attach messages with the same crypto context only when we're sure the receiver already processed the previous one. We're sure of this fact when we would see the _ACK message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants