On 20 Jul 2011, at 2:25 AM, Vinay Kumar wrote: > Hi All, > > I am using OpenSSL OpenSSL 0.9.8e. The OpenSSL function sometimes > sha1_block_host_order () crashes on Linux. Is there any fix available for > this issue or what are the modifications need to be done? Please guide me. > > The core back trace is as follows: > Program terminated with signal 11, Segmentation fault. > #0 0x00560670 in sha1_block_host_order () > (gdb) bt > #0 0x00560670 in sha1_block_host_order () > #1 0x005605a4 in sha1_block_host_order () [etc]
Unfortunately the hand-optimized assembly SHA1 implementation tends to confuse debuggers; only the first stack frame of that backtrace is likely accurate, so it's hard to tell where the fault is. Presumably the SHA1 function was either passed a NULL buffer, an invalid buffer, or an invalid buffer length, due to a bug in some code that calls it. You could try examining the machine instruction at which it crashed ("x/i $pc" in gdb); it is presumably reading from memory via a register. Examine the registers ("inf reg" in gdb) to see whether it was dereferencing address 0 (null pointer) or some other wild address (bad pointer or bad buffer length). With luck this will give you an idea what to look for next. You could also try recompiling openssl in a more debuggable form (disabling the optimized assembly). (The patches I submitted to Openssl RT ticket #2562 a couple of weeks ago make this problem less severe but they haven't been incorporated into openssl.) ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org