Bug 1320596

Summary: glibc: NULL pointer dereference in stub resolver with unconnectable name server addresses
Product: Red Hat Enterprise Linux 7 Reporter: Florian Weimer <fweimer>
Component: glibcAssignee: Florian Weimer <fweimer>
Status: CLOSED ERRATA QA Contact: Michael Petlan <mpetlan>
Severity: medium Docs Contact:
Priority: high    
Version: 7.3CC: ashankar, bgollahe, codonell, fweimer, mcermak, mnewsome, mpetlan, pfrankli, redhat-bugzilla, tlavigne
Target Milestone: rcKeywords: Patch, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: 1316972
: 1323839 (view as bug list) Environment:
Last Closed: 2016-11-03 08:31:14 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: 1316972    
Bug Blocks: 1323839    
Deadline: 2016-03-31   

Description Florian Weimer 2016-03-23 15:24:21 UTC
+++ This bug was initially created as a clone of Bug #1316972 +++

If /etc/resolv.conf contains addresses which cause the connect system call to fail immediately, queries which trigger search along the search path result in a segmentation fault.

A workaround is to remove the problematic addresses from /etc/resolv.conf.

--- Additional comment from Florian Weimer on 2016-03-23 16:22:08 CET ---

swbz#19825 is a very similar bug in send_vc/TCP (the original bug is about send_dg/UDP), so far only observed under valgrind.

swbz#19831 and swbz#19830 should be backported as well, to get cleaner test suite runs.

Comment 2 Florian Weimer 2016-03-31 08:23:26 UTC
Test case for the assert/NULL pointer dereference:

  https://pagure.io/glibc-resolv-tests/blob/master/f/tst-search2.c

Alternative test: Put “nameserver 255.255.255.255” as the first name server into /etc/resolv.conf, and run “getent ahosts does-not-exist”.  You need to have non-empty search path, too (“search redhat.com”, for example).

Comment 11 Michael Petlan 2016-08-04 14:15:39 UTC
Failed with glibc-2.17-105.el7 and passed with glibc-2.17-156.el7.

VERIFIED.

Comment 13 errata-xmlrpc 2016-11-03 08:31:14 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.

https://rhn.redhat.com/errata/RHSA-2016-2573.html