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.

Bug 2151334

Summary: backport Incorrect parsing of IPv6 IPs in sftp client [RHEL 8]
Product: Red Hat Enterprise Linux 8 Reporter: Amey <abetkike>
Component: opensshAssignee: Dmitry Belyavskiy <dbelyavs>
Status: CLOSED ERRATA QA Contact: Marek Havrila <mhavrila>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 8.7CC: cgaynor, dbelyavs, jjelen, sbroz, ssorce, szidek
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openssh-8.0p1-17.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 2162732 2162733 (view as bug list) Environment:
Last Closed: 2023-05-16 09:11:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2162732, 2162733    

Description Amey 2022-12-06 18:46:54 UTC
Description of problem:

After updating to RHEL 8 (from RHEL 7), sftp to ipv6 address fails. This is working in RHEL 7 and RHEL 9 hence this is a request to backport this into RHEL 8.

Version-Release number of selected component (if applicable):
RHEL 8 and openssh-clients* (/bin/sftp)

How reproducible: Every time.

Steps to Reproduce:
1. Login to RHEL 8 system and try to sftp to any ipv6 address as below - It FAILS

user@host:~$ sftp user@[xxxx:470:c2d7:903:xxxx:ed95:f06:a66e]
ssh: Could not resolve hostname [xxx:470:c2d7:903:xxxx:ed95:f06:a66e]: Name or service not known
Connection closed

2. Login to RHEL 7/9 system and try to sftp to any ipv6 address as below - It succeeds.

user@host:~$ sftp user@[xxxx:470:c2d7:903:xxxx:ed95:f06:a66e]
user@xxxx:470:c2d7:903:xxxx:ed95:f06:a66e's password:
Connected to xxxx:470:c2d7:903:xxxx:ed95:f06:a66e.

3. Note that if we use a colon (:) at the end of sftp command as below in RHEL 8 it works -

user@host:~$ sftp user@[xxxx:470:c2d7:903:xxxx:ed95:f06:a66e]:
user@xxxx:470:c2d7:903:xxxx:ed95:f06:a66e's password:
Connected to xxxx:470:c2d7:903:xxxx:ed95:f06:a66e.


Actual results:


Expected results:

In RHEL 8 sftp should accept ipv6 address when specified in square brackets, just like in RHEL 7/9.

Additional info:

In RHEL 9, the IPv6 addresses in square brackets still don't work, with the only exception of "sftp". This backport request is very specific to sftp client.

Comment 2 Dmitry Belyavskiy 2022-12-14 12:41:17 UTC
Probably the missing commit is 25e3bccbaa63d27b9d5e09c123f1eb28594d2bd6

Comment 17 errata-xmlrpc 2023-05-16 09:11:18 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 (openssh bug fix and enhancement update), 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/RHBA-2023:3032

Comment 18 Red Hat Bugzilla 2023-09-19 04:31:14 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days