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

Bug#40870: libc6: Segfault from getpwuid



Package: libc6
Version: 2.1.1-12
Severity: critical

Hi,

I've just had a really strange occurance. It would appear that getpwuid just
started segfaulting.

I hadn't done anything strange, things just started segfaulting all over the
place.. :(

For example, the following program:

#include <pwd.h>
#include <sys/types.h>

int main() {
  struct passwd * bar = getpwuid(0);
}

produced this backtrace:

Core was generated by `./a.out'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
#0  0x400db23a in __nss_database_lookup () from /lib/libc.so.6
(gdb) bt
#0  0x400db23a in __nss_database_lookup () from /lib/libc.so.6
#1  0x400dc9b5 in __nss_passwd_lookup () from /lib/libc.so.6
#2  0x400aaa9e in getpwuid_r () from /lib/libc.so.6
#3  0x400aa44c in getpwuid () from /lib/libc.so.6
#4  0x80483fd in main ()
#5  0x4003318f in __libc_start_main () from /lib/libc.so.6
(gdb) q

And a strace:

getuid()                                = 1000
socket(PF_UNIX, SOCK_STREAM, 0)         = 7
connect(7, {sun_family=AF_UNIX, sun_path="/var/run/.nscd_socket"}, 110) = -1 ECONNREFUSED (Connection refused)
close(7)                                = 0
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++

-- System Information
Debian Release: potato
Kernel Version: Linux downstairs 2.2.9 #5 Fri Jun 18 19:30:25 BST 1999 i686 unknown

Versions of the packages libc6 depends on:
ii  ldso            1.9.11-2       The Linux dynamic linker, library and utilit


Reply to: