Comment 2 for bug 1187790

Revision history for this message
Helio Loureiro (helioloureiro) wrote : Re: rinetd crashing (SIGBUS/SIGSEGV) on large lists

Installing source code (apt-get source -b rinetd), compiling, and testing generates similar error.

root@elx3030vlm-78:rinetd-0.62# make
./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -DHAVE_CONFIG_H -Wall -Wwrite-strings -I. -c -o rinetd.o rinetd.c
rinetd.c:196:6: warning: conflicting types for built-in function ‘log’ [enabled by default]
rinetd.c: In function ‘handleAccept’:
rinetd.c:1056:2: warning: pointer targets in passing argument 3 of ‘accept’ differ in signedness [-Wpointer-sign]
/usr/include/x86_64-linux-gnu/sys/socket.h:214:12: note: expected ‘socklen_t * __restrict__’ but argument is of type ‘int *’
rinetd.c: In function ‘log’:
rinetd.c:1467:6: warning: the address of ‘log’ will always evaluate as ‘true’ [-Waddress]
gcc rinetd.o match.o -o rinetd -Wl,-Bsymbolic-functions -Wl,-z,relro
root@elx3030vlm-78:rinetd-0.62# ./rinetd -f -c /tmp/rinetd.conf
*** buffer overflow detected ***: ./rinetd terminated
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x7f15f8c7c817]
/lib/x86_64-linux-gnu/libc.so.6(+0x109710)[0x7f15f8c7b710]
/lib/x86_64-linux-gnu/libc.so.6(+0x10a7ce)[0x7f15f8c7c7ce]
./rinetd[0x403de9]
./rinetd[0x401435]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7f15f8b9376d]
./rinetd[0x401469]
======= Memory map: ========
00400000-00406000 r-xp 00000000 fc:01 15731923 /usr/src/rinetd-0.62/rinetd
00605000-00606000 r--p 00005000 fc:01 15731923 /usr/src/rinetd-0.62/rinetd
00606000-00607000 rw-p 00006000 fc:01 15731923 /usr/src/rinetd-0.62/rinetd
01b95000-01bd7000 rw-p 00000000 00:00 0 [heap]
7f15f874f000-7f15f8764000 r-xp 00000000 fc:01 524340 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f15f8764000-7f15f8963000 ---p 00015000 fc:01 524340 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f15f8963000-7f15f8964000 r--p 00014000 fc:01 524340 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f15f8964000-7f15f8965000 rw-p 00015000 fc:01 524340 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f15f8965000-7f15f8971000 r-xp 00000000 fc:01 524480 /lib/x86_64-linux-gnu/libnss_files-2.15.so
7f15f8971000-7f15f8b70000 ---p 0000c000 fc:01 524480 /lib/x86_64-linux-gnu/libnss_files-2.15.so
7f15f8b70000-7f15f8b71000 r--p 0000b000 fc:01 524480 /lib/x86_64-linux-gnu/libnss_files-2.15.so
7f15f8b71000-7f15f8b72000 rw-p 0000c000 fc:01 524480 /lib/x86_64-linux-gnu/libnss_files-2.15.so
7f15f8b72000-7f15f8d27000 r-xp 00000000 fc:01 524384 /lib/x86_64-linux-gnu/libc-2.15.so
7f15f8d27000-7f15f8f26000 ---p 001b5000 fc:01 524384 /lib/x86_64-linux-gnu/libc-2.15.so
7f15f8f26000-7f15f8f2a000 r--p 001b4000 fc:01 524384 /lib/x86_64-linux-gnu/libc-2.15.so
7f15f8f2a000-7f15f8f2c000 rw-p 001b8000 fc:01 524384 /lib/x86_64-linux-gnu/libc-2.15.so
7f15f8f2c000-7f15f8f31000 rw-p 00000000 00:00 0
7f15f8f31000-7f15f8f53000 r-xp 00000000 fc:01 524485 /lib/x86_64-linux-gnu/ld-2.15.so
7f15f9120000-7f15f9123000 rw-p 00000000 00:00 0
7f15f9150000-7f15f9153000 rw-p 00000000 00:00 0
7f15f9153000-7f15f9154000 r--p 00022000 fc:01 524485 /lib/x86_64-linux-gnu/ld-2.15.so
7f15f9154000-7f15f9156000 rw-p 00023000 fc:01 524485 /lib/x86_64-linux-gnu/ld-2.15.so
7fff8bbc3000-7fff8bbe4000 rw-p 00000000 00:00 0 [stack]
7fff8bbff000-7fff8bc00000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Aborted (core dumped)