Bug 97828
| Summary: | Sudo returns segmentation fault | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | Owen Marshall <owen> |
| Component: | glibc | Assignee: | Jakub Jelinek <jakub> |
| Status: | CLOSED RAWHIDE | QA Contact: | Brian Brock <bbrock> |
| Severity: | high | Docs Contact: | |
| Priority: | medium | ||
| Version: | 9 | CC: | admin, drepper, fweimer, josh, twoerner, wtogami |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | i686 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | 2.3.2-31 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2003-08-05 17:07:50 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Owen Marshall
2003-06-22 19:47:59 UTC
sudo-1.6.6-3 is working for me on Red Hat 9 without any problems. Which kernel and glibc versions are you using? [owen@www owen]$ rpm -q kernel kernel-2.4.20-8 [owen@www owen]$ rpm -q glibc glibc-2.3.2-27.9 Do you have set additional environment variables like LD_LIBRARY_PATH or LD_PRELOAD that point to another glibc (for root or owen)? If not, please install the latest updates for 9. I'm experiencing this as well, on my quad Xeon mail server. Redhat 9 with sudo-
1.6.7p5-2 (upgraded from stock 1.6.6 in a failed effort to resolve) kernel-
2.4.20-8 & glibc-2.3.2-27.9.
The last part of an 'strace /usr/bin/sudo' shows:
getpid() = 16715
time(NULL) = 1058821355
sendto(4, "\24\0\0\0\22\0\1\3\353T\34?\0\0\0\0\0a\5@", 20, 0,
{sa_family=AF_NETLINK, sa_data="\0\0\0\0\0\0\0\0\0\0h\301\17B"}, 12) = 20
recvmsg(4, {msg_name(12)={sa_family=AF_NETLINK, sa_data="\0\0\0\0\0\0\0\0\0\0\0
\0\0\0"}, msg_iov(1)=[{"\264\0\0\0\20\0\2\0\353T\34?KA\0\0\0\377\4\3\1\0\0
\0I\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 368
recvmsg(4, {msg_name(12)={sa_family=AF_NETLINK, sa_data="\0\0\0\0\0\0\0\0\0\0\0
\0\0\0"}, msg_iov(1)=[{"\24\0\0\0\3\0\2\0\353T\34?KA\0\0\0\0\0\0\1\0\0\0I\0\0
\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 20
sendto(4, "\24\0\0\0\26\0\1\3\354T\34?\0\0\0\0\0a\5@", 20, 0,
{sa_family=AF_NETLINK, sa_data="\0\0\0\0\0\0\0\0\0\0h\301\17B"}, 12) = 20
recvmsg(4, {msg_name(12)={sa_family=AF_NETLINK, sa_data="\0\0\0\0\0\0\0\0\0\0\0
\0\0\0"}, msg_iov(1)=[{"D\0\0\0\24\0\0\0\354T\34?KA\0\0\2\10\200\376\1\0\0\0
\10"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 3944
brk(0) = 0x8060000
brk(0x8061000) = 0x8061000
recvmsg(4, {msg_name(12)={sa_family=AF_NETLINK, sa_data="\"\324\0\0\0\0\0\0\0\0
\0\0\0\0"}, msg_iov(1)=[{"D\0\0\0\24\0\0\0\354T\34?KA\0\0\2\10\201\0\2\0\0\0\10
\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 2244
brk(0) = 0x8061000
brk(0x8062000) = 0x8062000
recvmsg(4, {msg_name(12)={sa_family=AF_NETLINK, sa_data="\"\324\0\0\0\0\0\0\0\0
\0\0\0\0"}, msg_iov(1)=[{"\24\0\0\0\3\0\2\0\354T\34?KA\0\0\0\0\0\0\2\0\0\0\10\0
\1"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 20
brk(0) = 0x8062000
brk(0x8065000) = 0x8065000
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Using gdb /usr/bin/sudo I get:
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.
0x420fb07b in getifaddrs () from /lib/tls/libc.so.6
I have RPM verified all my packages, and verified that /lib/tls/libc.so.6 is
owned by my glibc package. A /sbin/service network stop allows sudo to operate
properly, but restarting networking again causes the segmentation fault. I
should probably also mention that I have eth0 listening on one class C, and
about 50 IPs each from two other class C's assigned as eth0 aliases.
There is a bug in glibc when using getifaddrs with more than 40 aliases to a
network device (tested with glibc-2.3.2-27.9). Please use the following code:
# cat > getifadd.c << EOF
#include <ifaddrs.h>
int main() {
struct ifaddrs *ifaddrs;
if (getifaddrs(&ifaddrs))
printf("not ok\n");
else
printf("ok\n");
return 1;
}
EOF
# gcc -o getifaddr getifaddr.c
# for i in `seq 1 40`; do ifconfig eth0:${i} 172.31.0.${i} up; done
# ./getifaddr
ok
# for i in `seq 1 41`; do ifconfig eth0:${i} 172.31.0.${i} up; done
# ./getifaddr
Segmentation fault
# gcc -g -O -o getifaddr-debug getifaddr.c /usr/lib/debug/libc.a
# gdb ./getifaddr-debug
GNU gdb Red Hat Linux (5.3post-0.20021129.18rh)
Copyright 2003 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-redhat-linux-gnu"...
(gdb) r
Starting program: /tmp/getifaddr
Program received signal SIGSEGV, Segmentation fault.
0x0805436d in getifaddrs (ifap=0xbffff6b4)
at ../sysdeps/unix/sysv/linux/ifaddrs.c:427
427 ../sysdeps/unix/sysv/linux/ifaddrs.c: No such file or directory.
in ../sysdeps/unix/sysv/linux/ifaddrs.c
(gdb) where
#0 0x0805436d in getifaddrs (ifap=0xbffff6b4)
at ../sysdeps/unix/sysv/linux/ifaddrs.c:427
#1 0x0804c0c5 in main () at getifaddr.c:6
#2 0x0804c2d7 in __libc_start_main (main=0x804c0b0 <main>, argc=1,
ubp_av=0xbffff8f4, init=0x804c458 <__libc_csu_init>,
fini=0x804c4ac <__libc_csu_fini>, rtld_fini=0x4000cc10 <_dl_fini>,
stack_end=0xffffffff) at ../sysdeps/generic/libc-start.c:193
This program is working with glibc-2.3.2-63 without any problems.
[root@mail sudo_problem]# gdb ./getifaddr-debug GNU gdb Red Hat Linux (5.3post-0.20021129.18rh) Copyright 2003 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-redhat-linux-gnu"... (gdb) r Starting program: /root/sudo_problem/getifaddr-debug Program received signal SIGSEGV, Segmentation fault. 0x0805436d in getifaddrs () (gdb) where #0 0x0805436d in getifaddrs () #1 0x0804c0c5 in main () at getifaddrs.c:6 #2 0x0804c2d7 in __libc_start_main () (gdb) so, have you guys found any kind of work around? I guess I'll try to find a newer version of glibc... My workaround consisted of limiting my IP aliases down under 40. This played hell with moving some mail domain, but by creating aliases I was able to work around this. I surely hope that a stable glibc rpm is in the works, and due out very soon. What? This bug is closed? What is the solution? I tried an up2date and nothing new showed up for glibc. anyone? Try the test release of the RHL9 errata at ftp://people.redhat.com/jakub/glibc/errata/2.3.2-27.9.4/ And if you still have problems change the state of the bug, otherwise I won't see it. |