Bug 678336

Summary: telnetd sockaddr is too small for IPV6 connections
Product: Red Hat Enterprise Linux 5 Reporter: Martin Poole <mpoole>
Component: telnetAssignee: Adam Tkac <atkac>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: medium    
Version: 5.6CC: asersen, azelinka, ovasik, starlight
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 678324 Environment:
Last Closed: 2012-06-25 08:27:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 678324    
Bug Blocks:    

Description Martin Poole 2011-02-17 15:54:56 UTC
+++ This bug was initially created as a clone of Bug #678324 +++

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:

--- Additional comment from mpoole on 2011-02-17 10:43:19 EST ---

Created attachment 479354 [details]
patch to using sockadd_storage structure for connection details

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

Comment 2 RHEL Program Management 2011-05-31 14:03:36 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.

Comment 10 errata-xmlrpc 2012-06-25 08:27:11 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.

http://rhn.redhat.com/errata/RHBA-2012-1035.html