Red Hat Bugzilla – Bug 89026
getifaddrs segfaults with moderate number of ipv6 secondary addresses
Last modified: 2016-11-24 10:15:25 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4a) Gecko/20030401
Description of problem:
After upgrading from the glibc-2.3.2-11.9 release that was provided with rh9,
the glibc-2.3.2-27.9 update, I noticed a segfault when trying to run sudo. I
loaded it up gdb:
Starting program: /usr/bin/sudo
(no debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x4015fecf in getifaddrs () from /lib/i686/libc.so.6
#0 0x4015fecf in getifaddrs () from /lib/i686/libc.so.6
#1 0x0804bb32 in freeifaddrs ()
#2 0x0804d7ca in freeifaddrs ()
#3 0x40077a07 in __libc_start_main () from /lib/i686/libc.so.6
This lead me to try removing my ipv6 secondary addresses (I have 38 of them up.)
After removing the secondaries, sudo no longer segfaults.
glibc 2.3.2-11.9 does not seem to have this issue. If I can provide
anyadditional information, please let me know.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Install glibc-2.3.2-27.9
2. Add 40 IPv6 secondary addresses
3. run sudo
Actual Results: aspirin[~]$ sudo su
Expected Results: su should be run as root
I use about 40 ipv6 addresses on this machine.
I assume you meant you have 40 addresses associated with an interface (and not
40 DNS entries). I set up my test machine like this and a test program crashed
indeed. So I cleaned up the file a bit more and added a few checks and now it's
working nicely. The result is in the official CVS glibc archive and will be in
the next binary release we make.
I have downloaded the rawhide release of glibc (2.3.2-57) June 24 2003 - 19:49
and tried this out on a Redhat 9 system. The system freezes inside the su/sudo
suite with this library installed. I have then retrofitted the ifaddrs.c code
to the release 9 update glibc-2.3.2-27.9 and again see the same problem.
Before I go away and bash this code to death, any suggestions as to where I
look for what is wrong.
Note, I am running systems with 60+ addresses allocated to their interfaces and
thus the getifaddrs function cores on me.
I have observed that the new code does work with wire-test, which bashes this
area of the glibc, but cannot test on an example system with lots of addresses
at present. So problem is a side effect - library incompatibility after build?
There is a RHL9 errata test release at
Try that. You should mix and match rawhide glibc and RHL9 userland.
Oh, and reopen the bug if you still have problems. If you don't
change the state I won't see the bug.