https://bugzilla.mindrot.org/show_bug.cgi?id=2757
Bug ID: 2757 Summary: rekey limit clashes with ClientAlive timeouts Product: Portable OpenSSH Version: 7.5p1 Hardware: Other OS: Linux Status: NEW Severity: enhancement Priority: P5 Component: sshd Assignee: unassigned-b...@mindrot.org Reporter: jje...@redhat.com Created attachment 3036 --> https://bugzilla.mindrot.org/attachment.cgi?id=3036&action=edit proposed patch Reproducer: 1. Start a server: /usr/sbin/sshd -D -ddd -p 8022 -o "ClientAliveCountMax=0" -o "ClientAliveInterval=900" -o "RekeyLimit=default 45s" -e 2. Connect with client ssh -p 8022 root@localhost "date; while :; do sleep 10; date; done" Actual result: No rekey happens, connection is dropped with error Timeout, client not responding. Expected result: Rekey happens in 45 seconds, the connection is not dropped Diagnostics: The function wait_until_can_do_something() is selecting the timeout for select() function, but sets client_alive_scheduled even if it is scheduled for later than rekey should happen. Proposed solution: The client_alive_scheduled variable should be set only if the time is lower than the time for external event (rekeying). The attached patch resolved the problem for me and with openssh-7.4 all tests passed. -- You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ openssh-bugs mailing list openssh-bugs@mindrot.org https://lists.mindrot.org/mailman/listinfo/openssh-bugs