Bug 1020486

Summary: glibc getnameinfo call fails when many PTR records are associated with an IP
Product: Red Hat Enterprise Linux 5 Reporter: Blake <blake.a.hudson>
Component: glibcAssignee: Siddhesh Poyarekar <spoyarek>
Status: CLOSED ERRATA QA Contact: Arjun Shankar <ashankar>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.9CC: ashankar, codonell, fweimer, law, mcermak, mfranc, mnewsome, pfrankli, spoyarek
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glibc-2.5-121 Doc Type: Bug Fix
Doc Text:
The getnameinfo function would incorrectly fail on a reverse lookup when there are a large number of PTR records are associated with the IP address being looked up. With this fix, getnameinfo now correctly returns one of the PTR records as the response.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-16 00:25:49 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: 1049888    
Attachments:
Description Flags
getnameinfo.c from Postfix source none

Description Blake 2013-10-17 18:37:16 UTC
Created attachment 813492 [details]
getnameinfo.c from Postfix source

Description of problem:
The glibc function call getnameinfo fails when the DNS response exceeds ~ 1024 bytes. 

It appears this was fixed upstream in early 2008:
https://sourceware.org/bugzilla/show_bug.cgi?id=5790
And was reported to Fedora, although never backported to RHEL:
https://bugzilla.redhat.com/show_bug.cgi?id=428067

Version-Release number of selected component (if applicable):
glibc-2.5-107.el5_9.5

How reproducible:
Always

Steps to Reproduce:
1. Compile and run the attached getnameinfo.c program (or grab it from postfix source)
2. Query an IP with 100+ PTR records


Actual results:
./getnameinfo 216.163.249.229
getnameinfo 216.163.249.229: Name or service not known

Expected results:
Information about any one of the valid PTR records should be displayed.
(The below is from an CentOS 6 box with glibc-2.12-1.107.el6.x86_64)
./getnameinfo 216.163.249.229
Hostname:       ms1.fpwmetlife.com
Address:        216.163.249.229


Additional info:
I was hoping the patch for this issue would be backported to RHEL 5.

Comment 1 Carlos O'Donell 2013-10-17 19:26:49 UTC
Thanks for submitting this issue. We'll consider this bug while we scope issues to fix for the next release.

Comment 3 Jeff Law 2013-11-26 16:36:54 UTC
Just an FYI from the planning call.  This will be ack'd by PM and is expected
to be within QE capacity for RHEL 5.11.

Comment 4 RHEL Program Management 2014-01-22 16:24:01 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 8 errata-xmlrpc 2014-09-16 00:25:49 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-2014-1213.html