mirror of
https://github.com/rustdesk/hbb_common.git
synced 2026-10-21 16:06:56 +00:00
kx_advertised: every message after the exchange, not the first alone
The contract named the server's first message after the key exchange. That frame sits at a position an attacker needs no key to find, so one who had lowered the advertisement in the clear only had to drop it to be rid of the check for the whole session. With every message carrying the echo, being rid of it means dropping them all, which is a plain DoS. The client already kept the check armed until an echo arrived; this is the wording the server side is written to. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EZ49AbZJYfm8NTp5yDPMab
This commit is contained in:
1 parent
445486ccaa
commit
1266b56150
2 files changed
+5
-3
No files matched your search
+1
-1
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user