Bug 1223095
Summary: | access to uninitialized memory in getaddrinfo if nscd is running | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Paulo Andrade <pandrade> | ||||
Component: | glibc | Assignee: | Florian Weimer <fweimer> | ||||
Status: | CLOSED ERRATA | QA Contact: | Sergey Kolosov <skolosov> | ||||
Severity: | medium | Docs Contact: | Mark Flitter <mflitter> | ||||
Priority: | medium | ||||||
Version: | 6.5 | CC: | anrussel, ashankar, codonell, fweimer, mcermak, mflitter, mnewsome, pfrankli, sauchter, skolosov, thomas.oulevey | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: |
Resolution for getaddrinfo accessing uninitialised data
On systems with nscd enabled, the getaddrinfo function in glibc could access uninitialized data and return false address information.
This update avoids accessing uninitialized data and ensures that correct addresses are returned.
|
Story Points: | --- | ||||
Clone Of: | Environment: | ||||||
Last Closed: | 2017-03-21 10:34:44 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: | 1172231, 1269194, 1361283 | ||||||
Attachments: |
|
Description
Paulo Andrade
2015-05-19 20:11:00 UTC
Created attachment 1027400 [details]
gaitest.c
Test case.
strace will show random values, like this:
connect(3, {sa_family=XXX /* AF_??? */, sa_data="\0\0\377\177\0\0\0\0\0\0\0\0\0\0"}, 16) = -1 EAFNOSUPPORT (Address family not supported by protocol)
where XXX is some random value.
Valgrind will tell all sorts of uninitialized memory use.
Moving this to rhel-6.8 since we're outside the rhel-6.7 development window. We'll have to look at this more carefully and decide how to fix it. I can confirm that the upstream fix addresses this issue: commit a071766ebfd853179ac39f9773f894029bf86d36 Author: Andreas Schwab <schwab> Date: Thu Mar 20 15:05:25 2014 +0100 Fix use of half-initialized result in getaddrinfo when using nscd (bug 16743) This fixes a bug in the way the results from __nscd_getai are collected: for every returned result a new entry is first added to the gaih_addrtuple list, but if that result doesn't match the request this entry remains uninitialized. So for this non-matching result an extra result with uninitialized content is returned. To reproduce (with nscd running): $ getent ahostsv4 localhost 127.0.0.1 STREAM localhost 127.0.0.1 DGRAM 127.0.0.1 RAW (null) STREAM (null) DGRAM (null) RAW https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a071766ebfd853179ac39f9773f894029bf86d36 This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions 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. https://rhn.redhat.com/errata/RHSA-2017-0680.html |