[openssh-commits] [openssh] 02/05: upstream: when sending ObscureKeystrokeTiming chaff packets, we

git+noreply at mindrot.org git+noreply at mindrot.org
Mon Jul 1 17:55:12 AEST 2024


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to annotated tag V_9_8_P1
in repository openssh.

commit 146c420d29d055cc75c8606327a1cf8439fe3a08
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Mon Jul 1 04:31:17 2024 +0000

    upstream: when sending ObscureKeystrokeTiming chaff packets, we
    
    can't rely on channel_did_enqueue to tell that there is data to send. This
    flag indicates that the channels code enqueued a packet on _this_ ppoll()
    iteration, not that data was enqueued in _any_ ppoll() iteration in the
    timeslice. ok markus@
    
    OpenBSD-Commit-ID: 009b74fd2769b36b5284a0188ade182f00564136
---
 clientloop.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/clientloop.c b/clientloop.c
index 0b6f3c9b..8ed8b1c3 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.407 2024/05/17 06:42:04 jsg Exp $ */
+/* $OpenBSD: clientloop.c,v 1.408 2024/07/01 04:31:17 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -607,8 +607,9 @@ obfuscate_keystroke_timing(struct ssh *ssh, struct timespec *timeout,
 		if (timespeccmp(&now, &chaff_until, >=)) {
 			/* Stop if there have been no keystrokes for a while */
 			stop_reason = "chaff time expired";
-		} else if (timespeccmp(&now, &next_interval, >=)) {
-			/* Otherwise if we were due to send, then send chaff */
+		} else if (timespeccmp(&now, &next_interval, >=) &&
+		    !ssh_packet_have_data_to_write(ssh)) {
+			/* If due to send but have no data, then send chaff */
 			if (send_chaff(ssh))
 				nchaff++;
 		}

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list