Red Hat Bugzilla – Bug 1320596
glibc: NULL pointer dereference in stub resolver with unconnectable name server addresses
Last modified: 2016-11-03 04:31:14 EDT
+++ 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.
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).
Failed with glibc-2.17-105.el7 and passed with glibc-2.17-156.el7. VERIFIED.
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