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 714823 - getaddrinfo returns PTR name in ai_canonname when using DNS
Summary: getaddrinfo returns PTR name in ai_canonname when using DNS
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: glibc
Version: 6.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 6.2
Assignee: Andreas Schwab
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On:
Blocks: 880347
TreeView+ depends on / blocked
 
Reported: 2011-06-20 21:40 UTC by Simo Sorce
Modified: 2018-11-14 11:20 UTC (History)
5 users (show)

Fixed In Version: glibc-2.12-1.33.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 17:47:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1526 0 normal SHIPPED_LIVE Low: glibc security, bug fix, and enhancement update 2011-12-06 01:02:21 UTC

Description Simo Sorce 2011-06-20 21:40:53 UTC
We have verified that getaddrinfo() does reverse address calls to DNS when AI_CANONNAME is passed in hints.ai_flags and returns the PTR name of the forward resolved ip address as Canonical name.

The canonical name is arguably not what is returned by the PTR record for various reasons. Aside the fact that PTR record are often not under control of the the same people that control the A name, A names can also be roundrobin names and return multiple addresses. Picking one and returnings its PTR as canonical name seem highly questionable.

A CNAME -> A name resolution is welcome as the A name is arguably the Canonical name of a CNAME. But getaddrinfo shouldn't do PTR requests to the DNS.

We found this when testing ssh+GSSAPI auth on laptops that can properly set the A record for their name usin dynamic DNS updates but cannot change the PTR record of whatever network they are currently travelling in.
This breaks kerberos which needs the canonical (A record) name to construct the principal name used to request a ticket when rdns = false is set in krb5.conf and GSSAPITrustDNS is set to no in ssh (the default).

Comment 2 Marko Myllynen 2011-06-20 22:33:00 UTC
It turned out that setting ai_family triggers this behaviour.

When calling getaddrinfo with ai_flags = AI_CANONNAME, ai_family = AF_UNSPEC then the ai_canonname returned is as expected.

When calling getaddrinfo with ai_flags = AI_CANONNAME, ai_family = AF_INET then the ai_canonname returned contains the PTR name of the forward resolved IP address as described in comment 0.

Comment 6 errata-xmlrpc 2011-12-06 17:47:52 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/RHSA-2011-1526.html


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