RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1952411 - Sshd randomly drops client connections when a RekeyLimit timeout is specified and ClientAliveCountMax is zero
Summary: Sshd randomly drops client connections when a RekeyLimit timeout is specified...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: openssh
Version: 8.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: beta
: ---
Assignee: Dmitry Belyavskiy
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-22 08:57 UTC by Eric Negaard
Modified: 2024-12-20 19:56 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-29 13:43:03 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1686065 1 low CLOSED SSH connections get closed when time-based rekeyring is used and ClientAliveMaxCount=0 2024-12-20 18:48:55 UTC

Description Eric Negaard 2021-04-22 08:57:43 UTC
Description of problem:

When both a RekeyLimit timeout is specified and ClientAliveCountMax is set to zero, sshd disconnects sessions even when input has been detected from the client within the specified ClientAliveInterval.

Version-Release number of selected component (if applicable):

8.0p1

How reproducible:

Always

Steps to Reproduce:
1. Edit /etc/ssh/sshd_config, set RekeyLimit to "512M 120", ClientAliveCountMax to 0 and ClientAliveInterval to 60
2. Restart sshd
3. Create a connection to the server via ssh, and type "date" every 10 seconds

Actual results:

The server disconnects the client session even though input was received from the client within the last ClientAliveInterval  seconds. In the example below, the client produced input at 8:39:25 UTC and the server disconnected the session 15 seconds later at 8:39:40 UTC even though ClientAliveInterval is set to 60.

Client side:

...
$ date
Thu Apr 22 08:39:02 UTC 2021
$ date
Thu Apr 22 08:39:19 UTC 2021
$ date
Thu Apr 22 08:39:25 UTC 2021
$ Connection to SERVERNAME closed by remote host.
Connection to SERVERNAME closed.

Server side:

Apr 22 08:39:40 SERVERNAME sshd[1428458]: Timeout, client not responding from user USERNAME CLIENT-IP port 37998

Expected results:

It is expected that the server allows the connection to remain open as long as input is received from the client every ClientAliveInterval seconds.

Additional info:

This is a re-open of Bug #1686065 because the fix for that bug appears to be incomplete.

Comment 3 Dmitry Belyavskiy 2021-04-23 12:35:19 UTC
Would you mind to test the proposed patch?

Comment 6 Alexander Sosedkin 2021-04-27 09:20:18 UTC
Note: the meaning of setting ClientAliveCountMax to 0 used to be undefined.
In newer openssh versions it disables connection termination [1] altogether.

The documentation suggests that the disconnect timeout on inactivity
is a product of ClientAliveCountMax and ClientAliveInterval.

[1] https://github.com/openssh/openssh-portable/commit/69334996ae203c51c70bf01d414c918a44618f8e


Note You need to log in before you can comment on or make changes to this bug.