[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#230281: libc6: Various programs segfault in __ns_samename in libresolv.so.2



Package: libc6
Version: 2.3.2.ds1-10
Severity: normal

Various programs die with a segmentation fault in __ns_samename when
given a nonexistent network address. For example, "ping qwerty", "finger
@qwerty", and "wget http://qwerty/"; do this (when no host "qwerty"
exists). They do manage to print out an error message from the failed
query, and the segfault happens when they try to exit.

Here's a small program that segfaults:

------------------------------
#include <netdb.h>
#include <stdlib.h>

int main() 
{
  gethostbyname("qwerty");
  exit(1);
}
------------------------------

vaino:/tmp> gdb ./foo
GNU gdb 5.3-debian
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-linux"...
(gdb) run
Starting program: /tmp/foo 

Program received signal SIGSEGV, Segmentation fault.
0x4c457f00 in ?? ()
(gdb) bt
#0  0x4c457f00 in ?? ()
#1  0x40174e66 in __ns_samename () from /lib/libresolv.so.2
#2  0x4000c4e6 in _dl_init () from /lib/ld-linux.so.2
#3  0x400548f2 in exit () from /lib/libc.so.6
#4  0x080483bc in main () at foo.c:7
#5  0x4003eda6 in __libc_start_main () from /lib/libc.so.6
(gdb) info shared
>From        To          Syms Read   Shared Object Library
0x4003ebc0  0x40134278  Yes         /lib/libc.so.6
0x40000be0  0x40011d5f  Yes         /lib/ld-linux.so.2
0x4015cd70  0x40162e10  Yes         /lib/libnss_files.so.2
0x40164e90  0x40166e20  Yes         /lib/libnss_dns.so.2
0x4016a980  0x40174e50  Yes         /lib/libresolv.so.2
(gdb) info registers
eax            0x40168003       1075216387
ecx            0x40152148       1075126600
edx            0x4c457f00       1279622912
ebx            0x401776d0       1075279568
esp            0xbffff96c       0xbffff96c
ebp            0xbffff978       0xbffff978
esi            0x804a460        134521952
edi            0x401775fc       1075279356
eip            0x4c457f00       0x4c457f00
eflags         0x10216  66070
cs             0x23     35
ss             0x2b     43
ds             0x2b     43
es             0x2b     43
fs             0x0      0
gs             0x0      0
fctrl          0x37f    895
fstat          0x0      0
ftag           0xffff   65535
fiseg          0x0      0
fioff          0x0      0
foseg          0x0      0
fooff          0x0      0
fop            0x0      0
mxcsr          0x1f80   8064
orig_eax       0xffffffff       -1
(gdb) x/16i $pc
0x4c457f00:     add    %al,(%eax)
0x4c457f02:     add    %al,(%eax)
0x4c457f04:     add    %al,(%eax)
0x4c457f06:     add    %al,(%eax)
0x4c457f08:     add    %al,(%eax)
0x4c457f0a:     add    %al,(%eax)
0x4c457f0c:     add    %al,(%eax)
0x4c457f0e:     add    %al,(%eax)
0x4c457f10:     add    %al,(%eax)
0x4c457f12:     add    %al,(%eax)
0x4c457f14:     add    %al,(%eax)
0x4c457f16:     add    %al,(%eax)
0x4c457f18:     add    %al,(%eax)
0x4c457f1a:     add    %al,(%eax)
0x4c457f1c:     add    %al,(%eax)
0x4c457f1e:     add    %al,(%eax)



-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux vaino 2.4.23 #1 Thu Dec 4 20:46:59 EET 2003 i686
Locale: LANG=en_IE@euro, LC_CTYPE=en_IE@euro

Versions of packages libc6 depends on:
hi  libdb1-compat                 2.1.3-7    The Berkeley database routines [gl

-- no debconf information




Reply to: