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

Complete version negotiation failure #1917

Closed
martinthomson opened this issue Oct 25, 2018 · 10 comments · Fixed by #2350
Closed

Complete version negotiation failure #1917

martinthomson opened this issue Oct 25, 2018 · 10 comments · Fixed by #2350
Labels
-transport editorial An issue that does not affect the design of the protocol; does not require consensus.

Comments

@martinthomson
Copy link
Member

It looks like this: Client supports A and B only. Server supports C and D only. Client sends initial in A (or B), server sends Version Negotiation in response. Client does what exactly? Might as well say.

We could get into the client maybe ignoring that because it's an attack, but we decided not to worry too much about that, so probably not worth saying.

@martinthomson martinthomson added editorial An issue that does not affect the design of the protocol; does not require consensus. -transport labels Oct 25, 2018
@mikkelfj
Copy link
Contributor

mikkelfj commented Oct 25, 2018

It's not (generally) an attack and it is a very possible because no-one supports the insecure A or B anymore (like TLS 1.0, 1.1). Client API returns the equivalent of 501 Not Implemented.

It could of course be an injected packet so the client could wait for something better to show up before failing.

No action required.

@mikkelfj
Copy link
Contributor

" The client MUST choose the version that it most prefers from those supported by the server" ->
or abort the connection attempt with an error indicating that no supported version was available. A client MAY discard such a Version Negotion packet and wait a short while in order to mitigate injection attacks.

@martinthomson
Copy link
Member Author

Yeah, all I'm looking for here is the "If the client does not support any of the versions the server offers, it aborts the connection attempt." bit you pointed at.

@mikkelfj
Copy link
Contributor

I was about to do a PR, but the text is in your PR

martinthomson added a commit that referenced this issue Oct 25, 2018
@martinthomson
Copy link
Member Author

Yep, I dumped it on top of that pile.

@igorlord
Copy link
Contributor

igorlord commented Nov 7, 2018

@mikkelfj, trying to mitigate this injection DoS attack is much harder than merely "waiting a bit before failing". If your implementation waits a bit in case of no common version in VN packet, what would it do, if an attacker injects a VN packet with a version you do support (which arrives before a reply from the server that actually supported your initial version)? What if the attacker races to the server a packet with your 4-tuple, CIDs, and version but different contents, establishing a connection on the server for you, which you would not be able to decrypt? Etc.

I'd rather defer mitigations, if any are possible, to a later version of this draft (or a different draft).

@mikkelfj
Copy link
Contributor

mikkelfj commented Nov 7, 2018

@igorlord There are definitely many more scenarios better handled in v2 or which are not practical to defend against at all without out of band knowledge such as signatures of some sort.

As to a VN with initial version, the draft already says:

A client MUST ignore a Version Negotiation packet that lists the client’s chosen version.

However "waiting a little" will give a valid packet a fighting chance against subversive attackers that wish to remain undetected.

@igorlord
Copy link
Contributor

igorlord commented Nov 7, 2018

As to a VN with initial version, the draft already says:

A client MUST ignore a Version Negotiation packet that lists the client’s chosen version.

However "waiting a little" will give a valid packet a fighting chance against subversive attackers that wish to remain undetected.

That's right. I meant the attack claiming another version you support, not your original version. Given that browsers are likely to be supporting predictable version sets, picking a different one is not likely to be a challenge.

The other problem with just waiting is that the client is likely better off just failing over to TCP quickly to improve user experience.

@mikkelfj
Copy link
Contributor

mikkelfj commented Nov 7, 2018

I won't necessarily argue against failover to TCP, but my working assumption is that QUIC is QUIC, even if the most likely implemention is QUIC/HTTP/HQ/H3 with support for TCP. Hence QUIC needs to be able to handle itself the best it can. Specific use cases may recommend fallbacks to TCP, but it won't work in general.

@igorlord
Copy link
Contributor

igorlord commented Nov 7, 2018

Right, though HTTP with TCP failover is a very important use case. But even without TCP, there are other options, such as failover to another IP returned by DNS. Of course, if you have exhausted all options, waiting may be the best alternative left. I would delegate guidance on this to a draft akin to Happy Eyeballs for QUIC (Applicability draft?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-transport editorial An issue that does not affect the design of the protocol; does not require consensus.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants