Bug 89026 - getifaddrs segfaults with moderate number of ipv6 secondary addresses
Summary: getifaddrs segfaults with moderate number of ipv6 secondary addresses
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc
Version: 9
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2003-04-16 18:01 UTC by Mark McCallister
Modified: 2016-11-24 15:15 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2003-04-17 02:12:24 UTC

Attachments (Terms of Use)

Description Mark McCallister 2003-04-16 18:01:21 UTC
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
(gdb) bt
#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):

How reproducible:

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
Segmentation fault

Expected Results:  su should be run as root

Additional info:

I use about 40 ipv6 addresses on this machine.

Comment 1 Ulrich Drepper 2003-04-17 02:12:24 UTC
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.

Comment 2 Howard Wilkinson 2003-07-02 11:51:32 UTC
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?

Comment 3 Ulrich Drepper 2003-11-04 21:37:25 UTC
There is a RHL9 errata test release at


Try that.  You should mix and match rawhide glibc and RHL9 userland.

Comment 4 Ulrich Drepper 2003-11-04 21:38:32 UTC
Oh, and reopen the bug if you still have problems.   If you don't
change the state I won't see the bug.

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