-
Notifications
You must be signed in to change notification settings - Fork 131
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
Initial packet number need not be zero #2462
Comments
I can work on this. Can you point me to the rough code location where one would implement this? I've just had a look around for ~30mins but haven't found an obvious spot yet. |
https://github.com/mozilla/neqo/blob/main/neqo-transport/src/crypto.rs#L430 and the code that is using it. |
After experimenting with this a bit and looking at the relevant QUIC RFC section I've got some questions for clarification:
|
Yes. Only the initial space.
Huh. I can't remember why this was added. Servers will need to support CI packets with numbers > 0, because if the CI with number 0 is lost, the first packet a server sees will have a higher number. |
The model that most implementation use is that the packets are effectively "lost". That's totally possible, if unlikely, so a receiver has to be able to deal with it. For Initial packets, that will push the receiver to ACK immediately, because it notes a gap, but receivers are required to ACK Initial packets immediately anyway. In other words, this is totally fine. It's unnecessary (an adversary needs to observe a random connection ID to be able to spoof something), but it might lead to catching of injected packets if an attacker injects a packet 0 that was never sent. Part of this change therefore needs to be able to handle receipt of an ACK for a packet that was never sent and break the connection. |
WIP. Two potential issues: 1. Did I mess up the validation in `CryptoDxState::continuation()`? 2. See the `FIXME` in `Version::confirm_version()`. Fixes mozilla#2462 CC @omansfeld
We should investigate using a random non-zero small integer as the initial packet number for a connection, to increase entropy a bit.
The text was updated successfully, but these errors were encountered: