[Crash-utility] [PATCH] avoid read_string() for no terminated buf.

Toshikazu Nakayama nakayama.ts at ncos.nec.co.jp
Mon Mar 19 09:56:32 UTC 2012


Hi Dave,

I met stack smashing detection by glibc at read_string()
then this patch is proposal.

*** stack smashing detected ***: crash terminated
======= Backtrace: =========
/lib/libc.so.6(__fortify_fail+0x4c)[0xfe12380]
/lib/libc.so.6(__fortify_fail+0x0)[0xfe12334]
./crash[0x10147bf0]
./crash(display_sys_stats+0xcf8)[0x1011cd74]
./crash(main_loop+0x300)[0x10068960]
./crash(current_interp_command_loop+0x48)[0x1021ac2c]
./crash[0x1021bcc4]
./crash(catch_errors+0x84)[0x1021a0c4]
./crash[0x1021d37c]
./crash(catch_errors+0x84)[0x1021a0c4]
./crash(gdb_main+0x58)[0x1021d3e8]
./crash(gdb_main_entry+0x6c)[0x1021d490]
./crash(gdb_main_loop+0x3b4)[0x10130e5c]
./crash(main+0x38c0)[0x10068650]
/lib/libc.so.6(+0x1f568)[0xfd36568]
/lib/libc.so.6(+0x1f728)[0xfd36728]

An failed vmalloc() including non terminated with NULLCHAR is root cause,
but I think it is better to keep other utilities without killed.

Thanks,
Toshi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Avoid-libc-possible-stack-smashing-detection-at-read.patch
Type: text/x-patch
Size: 2293 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20120319/52043f84/attachment.bin>


More information about the Crash-utility mailing list