Bug 1875

Summary: useradd segmentation fault
Product: Sisyphus Reporter: at <at>
Component: shadow-utilsAssignee: Mikhail Efremov <sem>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P4 CC: ldv, sem
Version: unstable   
Hardware: all   
OS: Linux   

Description at@altlinux.org 2003-01-09 15:57:49 MSK
sh-2.05b# useradd at
Segmentation fault
sh-2.05b# useradd at
mkdir: /etc/tcb/at: File exists
Problems creating /etc/tcb/at
sh-2.05b# rpm -qa
bzlib-1.0.2-alt6
sh-2.05b-alt4
gawk-3.1.1-alt4
libdb2-2.4.14-alt2
zlib-1.1.4-alt2
nss_tcb-0.9.8.1-alt1
pam-config-1.1.2-alt1
mktemp-1.4-alt2
crontabs-1.7-ipl12mdk
glibc-core-2.2.6-alt0.6
info-install-4.3-alt1
coreutils-4.5.3-alt2
libbeecrypt-2.2.0-alt2
libpopt-1.7-alt6
logrotate-3.6.2-alt2
pam_tcb-0.9.8.1-alt1
alt-gpgkeys-0.1-alt11
shadow-utils-4.0.0-alt8
filesystem-2.1.6-alt9
gzip-1.3.3-alt3
libtinfo-5.3.20021019-alt1
grep-2.5.1-alt0.2.cvs
libpam-0.75-alt17
libtcb-0.9.8.1-alt1
pam_passwdqc-0.7.1-alt1
perl-base-5.8.0-alt1
tcb-utils-0.9.8.1-alt1
setup-2.2.0-alt4
bzip2-1.0.2-alt6
terminfo-5.3.20021019-alt1
libpcre-3.9-alt3
libdb4-4.0.14-alt8
librpm-4.0.4-alt13
pam-0.75-alt17
pam_userpass-0.5.1-alt1
shadow-convert-4.0.0-alt8
rpm-4.0.4-alt13
sh-2.05b#

---

---

Comment 1 Dmitry V. Levin 2003-01-09 16:00:58 MSK
Insufficient information to reproduce.

Please rebuild shadow with \&quot;--enable debug\&quot; and try to get backtrace.
Comment 2 Dmitry V. Levin 2003-01-09 16:00:58 MSK
Insufficient information to reproduce.

Please rebuild shadow with \&quot;--enable debug\&quot; and try to get backtrace.
Comment 3 at@altlinux.org 2003-01-09 18:11:53 MSK
bash-2.05b# SHELL=/bin/sh LD_LIBRARY_PATH=/usr/lib/debug gdb useradd
GNU gdb ALT Linux (5.2.1-alt2)
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 \&quot;show copying\&quot; to see the conditions.
There is absolutely no warranty for GDB.  Type \&quot;show warranty\&quot; for details.
This GDB was configured as \&quot;i586-alt-linux\&quot;...(no debugging symbols found)...
(gdb) r at
Starting program: /usr/sbin/useradd at

Program received signal SIGSEGV, Segmentation fault.
strcmp (p1=0x4c2f7572 &lt;Address 0x4c2f7572 out of bounds&gt;, p2=0x8068808 \&quot;root\&quot;)
    at ../sysdeps/generic/strcmp.c:38
38      ../sysdeps/generic/strcmp.c: No such file or directory.
        in ../sysdeps/generic/strcmp.c
(gdb) bt
#0  strcmp (p1=0x4c2f7572 &lt;Address 0x4c2f7572 out of bounds&gt;, p2=0x8068808 \&quot;root\&quot;)
    at ../sysdeps/generic/strcmp.c:38
#1  0x0804e0b0 in strcpy () at strcpy:-1
#2  0x0804b153 in strcpy () at strcpy:-1
#3  0x0804c710 in strcpy () at strcpy:-1
#4  0x0804cf0a in strcpy () at strcpy:-1
#5  0x2ab19582 in __libc_start_main (main=0x804cb50 &lt;strcpy+11540&gt;, argc=2, ubp_av=0x7ffff754,
    init=0x80496f4 &lt;_init&gt;, fini=0x2aabca2c &lt;_dl_debug_mask&gt;, rtld_fini=0x4c2f7572,
    stack_end=0x8068808) at ../sysdeps/generic/libc-start.c:129
(gdb) q
The program is running.  Exit anyway? (y or n) y
bash-2.05b#
Comment 4 at@altlinux.org 2003-01-09 18:11:53 MSK
bash-2.05b# SHELL=/bin/sh LD_LIBRARY_PATH=/usr/lib/debug gdb useradd
GNU gdb ALT Linux (5.2.1-alt2)
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 \&quot;show copying\&quot; to see the conditions.
There is absolutely no warranty for GDB.  Type \&quot;show warranty\&quot; for details.
This GDB was configured as \&quot;i586-alt-linux\&quot;...(no debugging symbols found)...
(gdb) r at
Starting program: /usr/sbin/useradd at

Program received signal SIGSEGV, Segmentation fault.
strcmp (p1=0x4c2f7572 &lt;Address 0x4c2f7572 out of bounds&gt;, p2=0x8068808 \&quot;root\&quot;)
    at ../sysdeps/generic/strcmp.c:38
38      ../sysdeps/generic/strcmp.c: No such file or directory.
        in ../sysdeps/generic/strcmp.c
(gdb) bt
#0  strcmp (p1=0x4c2f7572 &lt;Address 0x4c2f7572 out of bounds&gt;, p2=0x8068808 \&quot;root\&quot;)
    at ../sysdeps/generic/strcmp.c:38
#1  0x0804e0b0 in strcpy () at strcpy:-1
#2  0x0804b153 in strcpy () at strcpy:-1
#3  0x0804c710 in strcpy () at strcpy:-1
#4  0x0804cf0a in strcpy () at strcpy:-1
#5  0x2ab19582 in __libc_start_main (main=0x804cb50 &lt;strcpy+11540&gt;, argc=2, ubp_av=0x7ffff754,
    init=0x80496f4 &lt;_init&gt;, fini=0x2aabca2c &lt;_dl_debug_mask&gt;, rtld_fini=0x4c2f7572,
    stack_end=0x8068808) at ../sysdeps/generic/libc-start.c:129
(gdb) q
The program is running.  Exit anyway? (y or n) y
bash-2.05b#
Comment 5 Dmitry V. Levin 2003-07-02 21:26:51 MSD
Fixed (patch from Alexey Voinov) in shadow-4.0.0-alt11.
Comment 6 Dmitry V. Levin 2003-07-02 21:26:51 MSD
Fixed (patch from Alexey Voinov) in shadow-4.0.0-alt11.