diff --git a/protos/rendezvous.proto b/protos/rendezvous.proto index e8c7d6c2a..fe0ef637a 100644 --- a/protos/rendezvous.proto +++ b/protos/rendezvous.proto @@ -297,9 +297,11 @@ message RendezvousMessage { HttpProxyResponse http_proxy_response = 28; IceCandidate ice_candidate = 29; } - // From the server, on its first message after a key exchange: the version it advertised, + // From the server, on every message after a key exchange: the version it advertised, // repeated inside the encrypted channel where nothing in transit can alter it. A client that // was shown a different value in the clear knows the handshake was altered and refuses the - // stream. Absent from servers that predate versions. + // stream. Every message and not the first alone, so that dropping one frame at a position + // that needs no key to find does not rid an attacker of the check; dropping them all is a + // plain DoS. Absent from servers that predate versions. uint32 kx_advertised = 30; } diff --git a/src/stream.rs b/src/stream.rs index 8702828da..e10c7e3d2 100644 --- a/src/stream.rs +++ b/src/stream.rs @@ -100,7 +100,7 @@ impl Stream { } } - /// Refuse the stream if the server's first encrypted message says it advertised a key + /// Refuse the stream if an encrypted message from the server says it advertised a key /// exchange version other than `seen`, the one this side received in the clear. #[inline] pub fn check_kx_advertised(&mut self, seen: u32) {