https://bugzilla.mindrot.org/show_bug.cgi?id=3827
Bug ID: 3827
Summary: UnusedConnectionTimeout hit early after ChannelTimeout
Product: Portable OpenSSH
Version: 9.6p1
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: sshd
Assignee: [email protected]
Reporter: [email protected]
Created attachment 3877
--> https://bugzilla.mindrot.org/attachment.cgi?id=3877&action=edit
Code to reproduce the issue
Conditions:
- Configure both UnusedConnectionTimeout and ChannelTimeout. I will
call the UnusedConnectionTimeout value as x and ChannelTimeout as y.
- Create an SSH connection and open a shell channel.
- Keep the channel idle.
Case 1: x <= y
- ChannelTimeout will be hit after y time. This is expected.
- But UnusedConnectionTimeout will be hit immediately after
ChannelTimeout. It did not wait for x time as expected.
Case 2: x > y
- ChannelTimeout will be hit after y time. This is expected.
- But UnusedConnectionTimeout will be hit (x-y) time after
ChannelTimeout. It did not wait for x time as expected.
For example:
Case 1:
UnusedConnectionTimeout 5
ChannelTimeout =*10
Both UnusedConnectionTimeout and ChannelTimeout hit after 10 seconds.
Case 2:
UnusedConnectionTimeout 15
ChannelTimeout =*10
ChannelTimeout hits after 10 seconds. UnusedConnectionTimeout hits
after 5 seconds of channel timeout hits.
>From what I understand, the UnusedConnectionTimeout should only start
when the total channel count is zero. In the above case, the total
channel count will only become zero when the channel timeout is hit.
Hence, the connection timeout should wait for 15 seconds fully after
channel timeout.
The issue can be seen may not be visible with an openSSH client as
openSSH client disconnects on its own if channel count is zero.
I have used the attached python paramiko script to hit this.
--
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
[email protected]
https://lists.mindrot.org/mailman/listinfo/openssh-bugs