marten-seemann / draft-seemann-quic-address-discovery

Other
2 stars 0 forks source link

What happens when the OBSERVED_ADDRESS frame's Sequence Number overflows? #27

Closed flub closed 1 week ago

flub commented 2 weeks ago

It is theoretically possible that the Sequence Number of an OBSERVED_ADDRESS frame overflows for a connection. What the implementation should do is left undefined currently as far as I understand.

Generally I think QUIC tends to immediately close a connection with an error if a counter overflows. Is this the right behaviour here as well? Should it be specified?

huitema commented 2 weeks ago

In theory it could happen, but 2^62 is a really big number -- 18 billions of billions. The event that you describe will not happen before the end of the universe if the server merely increases the counter by 1 for each new address, supposing of course that the connection stays up that long.

Of course, the roll over could happen if the server deliberately makes it happen, for example by incrementing the counter by 2^60 for each new address. Don't do that.

flub commented 1 week ago

The spec says it MUST be monotonically increased so you're not allowed to jump as I read it. So yeah, don't do that :)

Though don't we have to know how we should react if some peer is maliciously increasing this number?

marten-seemann commented 1 week ago

The receiver doesn't care about the absolute value of the sequence number, all it cares about is that it can ignore any frames with a smaller sequence number than the highest received.

Really, we've discussed this time and time again during the QUIC specification process. As Christian says, 2^62 is a really big number.

flub commented 1 week ago

Really, we've discussed this time and time again during the QUIC specification process. As Christian says, 2^62 is a really big number.

Is the rationale for this written down anywhere, maybe in RFC9000 or any related documents? That could help with understanding the nuances. This is still something that the type system forces us to make some decision on.