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 678324

Summary: telnetd sockaddr is too small for IPV6 connections
Product: Red Hat Enterprise Linux 6 Reporter: Martin Poole <mpoole>
Component: telnetAssignee: Adam Tkac <atkac>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: azelinka, ovasik, pkovar, starlight
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Prior to this update, the in.telnetd service used the sockaddr structure to store IPv6 addresses. This structure was too small in its size, and as a result, subsequent logins wrote incorrect records about the last login source. With this update, in.telnetd now uses the sockaddr_storage structure, which is large enough in its size to be able to store IPv6 addresses.
Story Points: ---
Clone Of:
: 678336 (view as bug list) Environment:
Last Closed: 2011-07-20 12:16:32 UTC Type: ---
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: 678336    
Attachments:
Description Flags
patch to using sockadd_storage structure for connection details none

Description Martin Poole 2011-02-17 15:42:27 UTC
Description of problem:

The sockaddr structure in telnetd.c main() is too small to hold an IPV6 address when converted to string form.  This corrupt value is then transferred to utmp to create a permanent bad record.


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

telnet-server-0.17-46.el6


How reproducible:

Always.

Steps to Reproduce:
1. telnet to IPV6 machine with no DNS record for IP
2. echo $REMOTEHOST
3.
  
Actual results:

$ telnet fd00:6969:6969:6969::91
Trying fd00:6969:6969:6969::91...
Connected to fd00:6969:6969:6969::91.
Escape character is '^]'.

login: test
Password: 
Last login: Thu Feb 17 15:26:32 from fd00:6969:6969:6969:37:a6f5:e045:84bf%15237108

[test@host-91 ~]$ echo $REMOTEHOST
fd00:6969:6969:6969:82:59c7:70af:9dbf%6078452


Expected results:

$ telnet fd00:6969:6969:6969::91
Trying fd00:6969:6969:6969::91...
Connected to fd00:6969:6969:6969::91.
Escape character is '^]'.

login: test
Password: 
Last login: Thu Feb 17 15:28:54 from fd00:6969:6969:6969:82:59c7:70af:9dbf%6078452

[test@host-91 ~]$ echo $REMOTEHOST
fd00:6969:6969:6969::12

Additional info:

Comment 1 Martin Poole 2011-02-17 15:43:19 UTC
Created attachment 479354 [details]
patch to using sockadd_storage structure for connection details

Comment 2 RHEL Program Management 2011-02-17 15:57:55 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 3 Adam Tkac 2011-03-18 14:59:40 UTC
The patch is OK, thanks for it.

Comment 7 Petr Kovar 2011-07-04 17:07:21 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Prior to this update, the in.telnetd service used the sockaddr structure to store IPv6 addresses. This structure was too small in its size, and as a result, subsequent logins wrote incorrect records about the last login source. With this update, in.telnetd now uses the sockaddr_storage structure, which is large enough in its size to be able to store IPv6 addresses.

Comment 9 errata-xmlrpc 2011-07-20 12:16:32 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0963.html