[openssl-dev] [openssl.org #4060] AutoReply: a crash happened inside SSL_Connect function

Matt Caswell via RT rt at openssl.org
Thu Oct 1 14:52:08 UTC 2015



On 01/10/15 15:18, Tiantian Liu via RT wrote:
> Hi,
> 
> Good morning! Thanks for your response.
> 
> I configured my OpenSSL with '-d' option to enable the debugging information. Where I don't know how to use it during my application running.

Which version of OpenSSL did you download? My version 1.0.1p doesn't
match up with the line numbers in your backtrace below, i.e. line 209 in
s3_clnt.c is not 'SSL_clear(s);' as it appears to be for you.

> Loaded symbols for /usr/lib/libkrb5.so.3
> Loaded symbols for /usr/lib/libk5crypto.so.3
> Loaded symbols for /usr/lib/libptcoresdk.so.2
> Loaded symbols for /lib/libcom_err.so.2
> Loaded symbols for /usr/lib/libstdc++.so.6
> Loaded symbols for /usr/lib/libssl.so.1.0.0
> Loaded symbols for /usr/lib/libcrypto.so.1.0.0

Where did you install the version of OpenSSL that you compiled? Did you
replace the system supplied version in `/usr/lib`? If so that was
probably not a good idea.



> Loaded symbols for /lib/libdl.so.2
> Loaded symbols for /lib/i686/nosegneg/libpthread.so.0
> Loaded symbols for /lib/i686/nosegneg/libc.so.6
> Loaded symbols for /usr/lib/libkrb5support.so.0
> Loaded symbols for /lib/libresolv.so.2
> Loaded symbols for /lib/libgcc_s.so.1
> Loaded symbols for /lib/i686/nosegneg/libm.so.6
> Loaded symbols for /lib/ld-linux.so.2
> 0x009e6402 in __kernel_vsyscall ()
> (gdb) c
> Continuing.
> 
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1231422576 (LWP 3480)]
> 0x00dd87e8 in SSL_clear (s=0xb4a03ec8) at ssl_lib.c:219
> 219         if (s->renegotiate) {

There is something not quite right about that. There is no way that line
should seg fault. The deref of `s` has already occurred several times by
the time it gets to that line so `s` should be sound. Either there is
some memory corruption going on, or that's not really the line we're on.

Matt




More information about the openssl-dev mailing list