Re: [suse-security] mailx dumps core if line with NUL character in mail
Steffen Dettmer wrote:
Program received signal SIGSEGV, Segmentation fault. 0x40090428 in fwrite () from /lib/libc.so.6 (gdb) bt #0 0x40090428 in fwrite () from /lib/libc.so.6 #1 0x0804f186 in append (mp=0xbffff22c, f=0x5e698) at fio.c:309 #2 0x0804ea3b in setptr (ibuf=0x805e010) at fio.c:97 #3 0x0804fe33 in setfile (name=0xbffff566 "./minimal") at lex.c:155 #4 0x08051dd9 in main (argc=3, argv=0xbffff384) at main.c:263
mmm... the line numbers does not match the piece of code you mailed?
Sorry, my fault again. I've used a modified version with couples of printfs so the line numbers do not match. Here is the result of the original code with debug enabled: Program received signal SIGSEGV, Segmentation fault. 0x40090428 in fwrite () from /lib/libc.so.6 (gdb) bt #0 0x40090428 in fwrite () from /lib/libc.so.6 #1 0x0804f2f7 in append (mp=0xbffff23c, f=0x5eb80) at fio.c:286 #2 0x0804ec4a in setptr (ibuf=0x805e4f8) at fio.c:95 #3 0x0804fff3 in setfile (name=0xbffff573 "minimal") at lex.c:155 #4 0x08052269 in main (argc=3, argv=0xbffff394) at main.c:263 #5 0x400467ee in __libc_start_main () from /lib/libc.so.6 Very interesitingly rpm -bp sets RPM_OPT_FLAGS so that the sources are compiled with -O2 -mcpu=i486 -fno-strength-reduce -funroll-loops If you lower the optimization level i.e. by make RPM_OPT_FLAGS='-O -mcpu=i486 -fno-strength-reduce' or make RPM_OPT_FLAGS='-O -g3 -mcpu=i486 -fno-strength-reduce' then mailx no longer dumps core. Regards PKM
participants (1)
-
Peter Karl Müller