Bug 21934 - glibc 2.2-5 has broken getnameinfo
glibc 2.2-5 has broken getnameinfo
Status: CLOSED ERRATA
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
7.0
i386 Linux
high Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Aaron Brown
: Security
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-12-08 00:35 EST by Philip Spencer
Modified: 2016-11-24 10:05 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-12-08 18:10:30 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Philip Spencer 2000-12-08 00:35:10 EST
The new glibc-2.2-5 has a broken getnameinfo function. Specifically, the sense of the NI_NOFQDN flag is reversed.





Calling getnameinfo(sa, salen, host, hostlen, serv, servlen, 0)





    returns ONLY THE INITIAL SEGMENT OF THE HOST NAME, whereas





 getnameinfo(sa, salen, host, hostlen, serv, servlen, NI_NOFQDN)





returns the fully qualified domain name. This is the reverse of the


proper behaviour (a flag of 0 should return the FQDN, and a flag of NI_NOFQDN should return only the host portion).





I have classed this as a security bug since it breaks a lot of security-sensitive software (such as openssh with RSARhosts authentication). I cannot think of any way to exploit it, but anything that messes with hostname lookup in this manner is inherently dangerous.
Comment 1 Jakub Jelinek 2000-12-19 04:35:18 EST
Fixed in glibc-2.2-9.

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