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 1686065 - SSH connections get closed when time-based rekeyring is used and ClientAliveMaxCount=0
Summary: SSH connections get closed when time-based rekeyring is used and ClientAliveM...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: openssh
Version: 8.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: 8.1
Assignee: Jakub Jelen
QA Contact: bsmejkal
URL:
Whiteboard:
Depends On: 1682500
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-06 16:12 UTC by Ondrej Moriš
Modified: 2024-12-20 18:48 UTC (History)
5 users (show)

Fixed In Version: openssh-8.0p1-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-05 22:41:32 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
sshd.log (21.59 KB, text/plain)
2019-03-06 16:12 UTC, Ondrej Moriš
no flags Details


Links
System ID Private Priority Status Summary Last Updated
OpenSSH Project 2757 0 None None None 2019-08-06 12:38:59 UTC
Red Hat Product Errata RHSA-2019:3702 0 None None None 2019-11-05 22:42:00 UTC

Internal Links: 1952411

Description Ondrej Moriš 2019-03-06 16:12:41 UTC
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

Comment 1 Jakub Jelen 2019-03-14 10:34:19 UTC
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.

Comment 4 Jakub Jelen 2019-04-26 13:18:16 UTC
The fix is merged upstream and available in the OpenSSH 8.0p1 release

Comment 11 errata-xmlrpc 2019-11-05 22:41:32 UTC
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

Comment 12 Eric Negaard 2021-04-12 17:56:26 UTC
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.

Comment 16 Jakub Jelen 2021-04-21 08:09:05 UTC
Please, open a new bug if you believe the issue is still present as described in the comment #11.

Comment 17 Eric Negaard 2021-04-22 09:05:03 UTC
Sorry, I missed the instructions in comment #11.

I have created new bug #1952411.


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