Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Created attachment 1541496[details]
sshd.log
This bug was initially created as a copy of Bug #1480510
I am copying this bug because:
Issue is present on RHEL-8.0.
Description of problem:
When configuring time-based rekeyring on the SSHD server (e.g. RekeyLimit=default 45s)and configuring "ClientAliveMaxCount=0" on the SSHD server also, SSH connection gets unexpectedly closed by the SSHD server just before the rekeyring happens.
Version-Release number of selected component (if applicable):
openssh-7.8p1-4.el8.x86_64
How reproducible:
ALWAYS
Steps to Reproduce:
1. Allow port 2222 for ssh.
# semanage port -a -p tcp -t ssh_port_t 2222
2. Start sshd on 2222.
# runcon system_u:system_r:initrc_t:s0 bash -c "(/usr/sbin/sshd -D -ddd -p 2222 -o 'ClientAliveCountMax=0' -o 'ClientAliveInterval=900' -o 'RekeyLimit=default 15s' &> sshd.log)&
3. Connect by ssh and wait more than 15 seconds.
# ssh root@localhost
...
Actual results:
Connection is closed (full sshd.log attached).
Timeout, client not responding from user root ::1 port 39000
Expected results:
Connection stays alive for ClientAliveInterval.
Additional info:
N/A
First of all, this is misconfiguration, that behaves this wrong way. The upstream still did not manage to fix this (attached upstream bug) so I do not think it is super-important issue, even though it worked in RHEL7.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2019:3702
This bug is still present in openssh-8.0p1-5.el8 on Red Hat Enterprise Linux release 8.3 (Ootpa), so the upstream fix was not complete.
It is easily reproducible if the timeout component of RekeyLimit is set to something greater than ClientAliveInterval, for example with the following settings in sshd_config:
ClientAliveCountMax 0
ClientAliveInterval 60
RekeyLimit 512M 120
The session will almost always be disconnected as soon as the RekeyLimit is reached, because with the current openssh 8.0p1 code any input that occurs during the final ClientAliveInterval seconds of the RekeyLimit timer does not count towards updating the last_client_time variable which is used for implementing the timeout.
Therefore I request that this ticket be reopened.