SSL_write() crashes

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

SSL_write() crashes

Dusty Hendrickson
We currently have an SSL client/server setup that uses a basic "send
request, receive response" architecture.  In one scenario, we did something
similar to the following:

-----------------------------
Client:

1. Send request
2. Delete connection

Server:

1. Wait for connection
2. Process request
3. Send response
-----------------------------

The issue here was that the client never tried to receive a response (since
it was unnecessary) and simply deleted the connection.  However, the server
was trying to send a response, even though the client closed the connection.
We expected the SSL_write() function to handle such a scenario, returning an
error code or something similar.  However, it simply crashed.  The last line
of code that executes is the following:


int ret = SSL_write( ssl, &buffer[ bytesWritten ], length - bytesWritten );


We know that bytesWritten is within the bounds of the 'buffer' array and
that 'length - bytesWritten' is always greater than 0.  Therefore we believe
the issue to be with SSL_write() itself.  We are using OpenSSL 0.9.8.
Anyone ever run into something like this, or have any ideas on what might be
happening?  Any suggestions would be appreciated.  Thanks

Dusty

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: SSL_write() crashes

Kyle Hamilton
Chances are, you received a SIGPIPE.  If not caught, that's a fatal
signal.  (SIGPIPE occurs when you try to write to a socket that has
been closed by the other end.)

-Kyle H

On 2/22/06, Dusty Hendrickson <[hidden email]> wrote:

> We currently have an SSL client/server setup that uses a basic "send
> request, receive response" architecture.  In one scenario, we did something
> similar to the following:
>
> -----------------------------
> Client:
>
> 1. Send request
> 2. Delete connection
>
> Server:
>
> 1. Wait for connection
> 2. Process request
> 3. Send response
> -----------------------------
>
> The issue here was that the client never tried to receive a response (since
> it was unnecessary) and simply deleted the connection.  However, the server
> was trying to send a response, even though the client closed the connection.
> We expected the SSL_write() function to handle such a scenario, returning an
> error code or something similar.  However, it simply crashed.  The last line
> of code that executes is the following:
>
>
> int ret = SSL_write( ssl, &buffer[ bytesWritten ], length - bytesWritten );
>
>
> We know that bytesWritten is within the bounds of the 'buffer' array and
> that 'length - bytesWritten' is always greater than 0.  Therefore we believe
> the issue to be with SSL_write() itself.  We are using OpenSSL 0.9.8.
> Anyone ever run into something like this, or have any ideas on what might be
> happening?  Any suggestions would be appreciated.  Thanks
>
> Dusty
>
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [hidden email]
> Automated List Manager                           [hidden email]
>
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

RE: SSL_write() crashes

Dusty Hendrickson
I've never really dealt with signals before, but I will definitely look into
it.  Thanks for the heads up.  Any idea if there is a way to circumvent this
in a cross-platform nature?

Dusty

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Kyle Hamilton
Sent: Wednesday, February 22, 2006 4:31 PM
To: [hidden email]
Subject: Re: SSL_write() crashes

Chances are, you received a SIGPIPE.  If not caught, that's a fatal
signal.  (SIGPIPE occurs when you try to write to a socket that has
been closed by the other end.)

-Kyle H

On 2/22/06, Dusty Hendrickson <[hidden email]> wrote:
> We currently have an SSL client/server setup that uses a basic "send
> request, receive response" architecture.  In one scenario, we did
something

> similar to the following:
>
> -----------------------------
> Client:
>
> 1. Send request
> 2. Delete connection
>
> Server:
>
> 1. Wait for connection
> 2. Process request
> 3. Send response
> -----------------------------
>
> The issue here was that the client never tried to receive a response
(since
> it was unnecessary) and simply deleted the connection.  However, the
server
> was trying to send a response, even though the client closed the
connection.
> We expected the SSL_write() function to handle such a scenario, returning
an
> error code or something similar.  However, it simply crashed.  The last
line
> of code that executes is the following:
>
>
> int ret = SSL_write( ssl, &buffer[ bytesWritten ], length - bytesWritten
);
>
>
> We know that bytesWritten is within the bounds of the 'buffer' array and
> that 'length - bytesWritten' is always greater than 0.  Therefore we
believe
> the issue to be with SSL_write() itself.  We are using OpenSSL 0.9.8.
> Anyone ever run into something like this, or have any ideas on what might
be
> happening?  Any suggestions would be appreciated.  Thanks
>
> Dusty
>
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [hidden email]
> Automated List Manager                           [hidden email]
>
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: SSL_write() crashes

Kyle Hamilton
Look for manpages on sigaction() and signal().  signal() is not
thread-safe, sigaction() is.

These will work on POSIX environments.  I believe Windows doesn't send
a signal, but rather returns an error with WSAGetLastError() returning
"ECONNRESET" or something like that.

The easiest way to handle it in a single-threaded environment is:
#include <signal.h>
signal(SIGPIPE, SIG_IGN);

-Kyle H

On 2/22/06, Dusty Hendrickson <[hidden email]> wrote:

> I've never really dealt with signals before, but I will definitely look into
> it.  Thanks for the heads up.  Any idea if there is a way to circumvent this
> in a cross-platform nature?
>
> Dusty
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Kyle Hamilton
> Sent: Wednesday, February 22, 2006 4:31 PM
> To: [hidden email]
> Subject: Re: SSL_write() crashes
>
> Chances are, you received a SIGPIPE.  If not caught, that's a fatal
> signal.  (SIGPIPE occurs when you try to write to a socket that has
> been closed by the other end.)
>
> -Kyle H
>
> On 2/22/06, Dusty Hendrickson <[hidden email]> wrote:
> > We currently have an SSL client/server setup that uses a basic "send
> > request, receive response" architecture.  In one scenario, we did
> something
> > similar to the following:
> >
> > -----------------------------
> > Client:
> >
> > 1. Send request
> > 2. Delete connection
> >
> > Server:
> >
> > 1. Wait for connection
> > 2. Process request
> > 3. Send response
> > -----------------------------
> >
> > The issue here was that the client never tried to receive a response
> (since
> > it was unnecessary) and simply deleted the connection.  However, the
> server
> > was trying to send a response, even though the client closed the
> connection.
> > We expected the SSL_write() function to handle such a scenario, returning
> an
> > error code or something similar.  However, it simply crashed.  The last
> line
> > of code that executes is the following:
> >
> >
> > int ret = SSL_write( ssl, &buffer[ bytesWritten ], length - bytesWritten
> );
> >
> >
> > We know that bytesWritten is within the bounds of the 'buffer' array and
> > that 'length - bytesWritten' is always greater than 0.  Therefore we
> believe
> > the issue to be with SSL_write() itself.  We are using OpenSSL 0.9.8.
> > Anyone ever run into something like this, or have any ideas on what might
> be
> > happening?  Any suggestions would be appreciated.  Thanks
> >
> > Dusty
> >
> > ______________________________________________________________________
> > OpenSSL Project                                 http://www.openssl.org
> > User Support Mailing List                    [hidden email]
> > Automated List Manager                           [hidden email]
> >
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [hidden email]
> Automated List Manager                           [hidden email]
>
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [hidden email]
> Automated List Manager                           [hidden email]
>
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

RE: SSL_write() crashes

Mikhail Kruk-2
In reply to this post by Dusty Hendrickson
On Wed, 22 Feb 2006, Dusty Hendrickson wrote:

> I've never really dealt with signals before, but I will definitely look into
> it.  Thanks for the heads up.  Any idea if there is a way to circumvent this
> in a cross-platform nature?

#if defined(unix)
   {struct sigaction act;
   act.sa_handler = SIG_IGN;
   sigemptyset (&act.sa_mask);
   act.sa_flags = 0;
   sigaction (SIGPIPE, &act, NULL);}
#endif

>
> Dusty
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Kyle Hamilton
> Sent: Wednesday, February 22, 2006 4:31 PM
> To: [hidden email]
> Subject: Re: SSL_write() crashes
>
> Chances are, you received a SIGPIPE.  If not caught, that's a fatal
> signal.  (SIGPIPE occurs when you try to write to a socket that has
> been closed by the other end.)
>
> -Kyle H
>
> On 2/22/06, Dusty Hendrickson <[hidden email]> wrote:
>> We currently have an SSL client/server setup that uses a basic "send
>> request, receive response" architecture.  In one scenario, we did
> something
>> similar to the following:
>>
>> -----------------------------
>> Client:
>>
>> 1. Send request
>> 2. Delete connection
>>
>> Server:
>>
>> 1. Wait for connection
>> 2. Process request
>> 3. Send response
>> -----------------------------
>>
>> The issue here was that the client never tried to receive a response
> (since
>> it was unnecessary) and simply deleted the connection.  However, the
> server
>> was trying to send a response, even though the client closed the
> connection.
>> We expected the SSL_write() function to handle such a scenario, returning
> an
>> error code or something similar.  However, it simply crashed.  The last
> line
>> of code that executes is the following:
>>
>>
>> int ret = SSL_write( ssl, &buffer[ bytesWritten ], length - bytesWritten
> );
>>
>>
>> We know that bytesWritten is within the bounds of the 'buffer' array and
>> that 'length - bytesWritten' is always greater than 0.  Therefore we
> believe
>> the issue to be with SSL_write() itself.  We are using OpenSSL 0.9.8.
>> Anyone ever run into something like this, or have any ideas on what might
> be
>> happening?  Any suggestions would be appreciated.  Thanks
>>
>> Dusty
>>
>> ______________________________________________________________________
>> OpenSSL Project                                 http://www.openssl.org
>> User Support Mailing List                    [hidden email]
>> Automated List Manager                           [hidden email]
>>
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [hidden email]
> Automated List Manager                           [hidden email]
>
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [hidden email]
> Automated List Manager                           [hidden email]
>
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Trying to build OpenSSL 0.9.8a from source

Fabro, Loic
In reply to this post by Dusty Hendrickson
Hi All,
 
[Feel free to point me to an FAQ if I missed one; google did not yield any useful result neither]
 
I tried to build OpenSSL from source but after the compilation, the make test returns errors.
Where should I start to find what my problem could be? Could the fact that I have a previous version of openSSL on that machine make a difference?
 
cat /proc/version =>
Linux version 2.4.20-27.7 ([hidden email]) (gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-126)) #1 Thu Dec 11 14:48:31 EST 2003
 
cat /proc/cpuinfo =>
processor       : 0
vendor_id       : CyrixInstead
cpu family      : 5
model           : 2
model name      : 6x86 2x Core/Bus Clock
stepping        : 7
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : yes
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu cyrix_arr
bogomips        : 133.12
 
OpenSSL built from source using a
./config --prefix=/usr/local/openssl -fPIC && make && make test
 
extract of the log:
==========
input word alignment test 0 1 2 3
output word alignment test 0 1 2 3
fast crypt test
../util/shlib_wrap.sh ./ideatest
ecb idea error encrypting
got     :EB 56 DB 71 48 13 B9 73
expected:11 FB ED 2B 01 98 6D E5
ecb idea error decrypting
got     :47 8E 86 68 49 DF 7E 0A
expected:00 00 00 01 00 02 00 03
cbc idea ok
cfb64 idea idea_cfb64_encrypt encrypt error
B5EF5B886EBAC9A9
9728211447C9E191
19ACC3AEFEE5CB2F
bad
make[1]: *** [test_idea] Error 5
make[1]: Leaving directory `/opt3/temp/openssl-0.9.8a/test'
make: *** [tests] Error 2
==========
 
Thanks,
Loic.

winmail.dat (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Trying to build OpenSSL 0.9.8a from source

Kyle Hamilton
Why are you using -fPIC?

-Kyle H

On 2/22/06, Fabro, Loic <[hidden email]> wrote:

> Hi All,
>
> [Feel free to point me to an FAQ if I missed one; google did not yield any useful result neither]
>
> I tried to build OpenSSL from source but after the compilation, the make test returns errors.
> Where should I start to find what my problem could be? Could the fact that I have a previous version of openSSL on that machine make a difference?
>
> cat /proc/version =>
> Linux version 2.4.20-27.7 ([hidden email]) (gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-126)) #1 Thu Dec 11 14:48:31 EST 2003
>
> cat /proc/cpuinfo =>
> processor       : 0
> vendor_id       : CyrixInstead
> cpu family      : 5
> model           : 2
> model name      : 6x86 2x Core/Bus Clock
> stepping        : 7
> fdiv_bug        : no
> hlt_bug         : no
> f00f_bug        : no
> coma_bug        : yes
> fpu             : yes
> fpu_exception   : yes
> cpuid level     : 1
> wp              : yes
> flags           : fpu cyrix_arr
> bogomips        : 133.12
>
> OpenSSL built from source using a
> ./config --prefix=/usr/local/openssl -fPIC && make && make test
>
> extract of the log:
> ==========
> input word alignment test 0 1 2 3
> output word alignment test 0 1 2 3
> fast crypt test
> ../util/shlib_wrap.sh ./ideatest
> ecb idea error encrypting
> got     :EB 56 DB 71 48 13 B9 73
> expected:11 FB ED 2B 01 98 6D E5
> ecb idea error decrypting
> got     :47 8E 86 68 49 DF 7E 0A
> expected:00 00 00 01 00 02 00 03
> cbc idea ok
> cfb64 idea idea_cfb64_encrypt encrypt error
> B5EF5B886EBAC9A9
> 9728211447C9E191
> 19ACC3AEFEE5CB2F
> bad
> make[1]: *** [test_idea] Error 5
> make[1]: Leaving directory `/opt3/temp/openssl-0.9.8a/test'
> make: *** [tests] Error 2
> ==========
>
> Thanks,
> Loic.
>
>
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

RE: Trying to build OpenSSL 0.9.8a from source

Fabro, Loic
In reply to this post by Fabro, Loic
I am not 100% sure.... I read that this is what I needed to include....
I also tried to build it without -fPIC and I get the same result.
I will try removing the idea support and see what I get.

-- Loic.

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]]On Behalf Of Kyle Hamilton
Sent: Wednesday, February 22, 2006 11:11 PM
To: [hidden email]
Subject: Re: Trying to build OpenSSL 0.9.8a from source


Why are you using -fPIC?

-Kyle H

On 2/22/06, Fabro, Loic wrote:

> Hi All,
>
> [Feel free to point me to an FAQ if I missed one; google did not yield any useful result neither]
>
> I tried to build OpenSSL from source but after the compilation, the make test returns errors.
> Where should I start to find what my problem could be? Could the fact that I have a previous version of openSSL on that machine make a difference?
>
> cat /proc/version =>
> Linux version 2.4.20-27.7 ([hidden email]) (gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-126)) #1 Thu Dec 11 14:48:31 EST 2003
>
> cat /proc/cpuinfo =>
> processor       : 0
> vendor_id       : CyrixInstead
> cpu family      : 5
> model           : 2
> model name      : 6x86 2x Core/Bus Clock
> stepping        : 7
> fdiv_bug        : no
> hlt_bug         : no
> f00f_bug        : no
> coma_bug        : yes
> fpu             : yes
> fpu_exception   : yes
> cpuid level     : 1
> wp              : yes
> flags           : fpu cyrix_arr
> bogomips        : 133.12
>
> OpenSSL built from source using a
> ./config --prefix=/usr/local/openssl -fPIC && make && make test
>
> extract of the log:
> ==========
> input word alignment test 0 1 2 3
> output word alignment test 0 1 2 3
> fast crypt test
> ../util/shlib_wrap.sh ./ideatest
> ecb idea error encrypting
> got     :EB 56 DB 71 48 13 B9 73
> expected:11 FB ED 2B 01 98 6D E5
> ecb idea error decrypting
> got     :47 8E 86 68 49 DF 7E 0A
> expected:00 00 00 01 00 02 00 03
> cbc idea ok
> cfb64 idea idea_cfb64_encrypt encrypt error
> B5EF5B886EBAC9A9
> 9728211447C9E191
> 19ACC3AEFEE5CB2F
> bad
> make[1]: *** [test_idea] Error 5
> make[1]: Leaving directory `/opt3/temp/openssl-0.9.8a/test'
> make: *** [tests] Error 2
> ==========
>
> Thanks,
> Loic.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Trying to build OpenSSL 0.9.8a from source

Kyle Hamilton
Try also using 'no-asm' and see how it does.  (This will generate
slower code, but it may generate code that will pass the IDEA tests.)

Also note that IDEA is covered by patent worldwide, so removing its
support may not be a bad idea in any case, unless you have a license
to use it.

-Kyle H

On 2/23/06, Fabro, Loic <[hidden email]> wrote:

> I am not 100% sure.... I read that this is what I needed to include....
> I also tried to build it without -fPIC and I get the same result.
> I will try removing the idea support and see what I get.
>
> -- Loic.
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]]On Behalf Of Kyle Hamilton
> Sent: Wednesday, February 22, 2006 11:11 PM
> To: [hidden email]
> Subject: Re: Trying to build OpenSSL 0.9.8a from source
>
>
> Why are you using -fPIC?
>
> -Kyle H
>
> On 2/22/06, Fabro, Loic wrote:
> > Hi All,
> >
> > [Feel free to point me to an FAQ if I missed one; google did not yield any useful result neither]
> >
> > I tried to build OpenSSL from source but after the compilation, the make test returns errors.
> > Where should I start to find what my problem could be? Could the fact that I have a previous version of openSSL on that machine make a difference?
> >
> > cat /proc/version =>
> > Linux version 2.4.20-27.7 ([hidden email]) (gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-126)) #1 Thu Dec 11 14:48:31 EST 2003
> >
> > cat /proc/cpuinfo =>
> > processor       : 0
> > vendor_id       : CyrixInstead
> > cpu family      : 5
> > model           : 2
> > model name      : 6x86 2x Core/Bus Clock
> > stepping        : 7
> > fdiv_bug        : no
> > hlt_bug         : no
> > f00f_bug        : no
> > coma_bug        : yes
> > fpu             : yes
> > fpu_exception   : yes
> > cpuid level     : 1
> > wp              : yes
> > flags           : fpu cyrix_arr
> > bogomips        : 133.12
> >
> > OpenSSL built from source using a
> > ./config --prefix=/usr/local/openssl -fPIC && make && make test
> >
> > extract of the log:
> > ==========
> > input word alignment test 0 1 2 3
> > output word alignment test 0 1 2 3
> > fast crypt test
> > ../util/shlib_wrap.sh ./ideatest
> > ecb idea error encrypting
> > got     :EB 56 DB 71 48 13 B9 73
> > expected:11 FB ED 2B 01 98 6D E5
> > ecb idea error decrypting
> > got     :47 8E 86 68 49 DF 7E 0A
> > expected:00 00 00 01 00 02 00 03
> > cbc idea ok
> > cfb64 idea idea_cfb64_encrypt encrypt error
> > B5EF5B886EBAC9A9
> > 9728211447C9E191
> > 19ACC3AEFEE5CB2F
> > bad
> > make[1]: *** [test_idea] Error 5
> > make[1]: Leaving directory `/opt3/temp/openssl-0.9.8a/test'
> > make: *** [tests] Error 2
> > ==========
> >
> > Thanks,
> > Loic.
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [hidden email]
> Automated List Manager                           [hidden email]
>
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

RE: Trying to build OpenSSL 0.9.8a from source

Fabro, Loic
In reply to this post by Fabro, Loic
Hum... I remove support for IDEA (and no fPIC) and now the test is segfaulting..
===========
../util/shlib_wrap.sh ./destest
Doing cbcm
Doing ecb
Doing ede ecb
Doing cbc
Doing desx cbc
Doing ede cbc
Doing pcbc
Doing cfb8 cfb16 cfb32 cfb48 cfb64 cfb64() ede_cfb64() done
Doing ofb
Doing ofb64
Doing ede_ofb64
Doing cbc_cksum
Doing quad_cksum
input word alignment test 0 1 2 3
output word alignment test 0 1 2 3
fast crypt test
../util/shlib_wrap.sh ./ideatest
No IDEA support
../util/shlib_wrap.sh ./shatest
test 1 ok
test 2 ok
test 3 ok
../util/shlib_wrap.sh ./sha1test
test 1 ok
test 2 ok
make[1]: *** [test_sha] Segmentation fault
make[1]: Leaving directory `/opt3/temp/openssl-0.9.8a/test'
make: *** [tests] Error 2
===========

Let me try without assembly code.

-- Loic.

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]]On Behalf Of Kyle Hamilton
Sent: Thursday, February 23, 2006 10:09 PM
To: [hidden email]
Subject: Re: Trying to build OpenSSL 0.9.8a from source


Try also using 'no-asm' and see how it does.  (This will generate
slower code, but it may generate code that will pass the IDEA tests.)

Also note that IDEA is covered by patent worldwide, so removing its
support may not be a bad idea in any case, unless you have a license
to use it.

-Kyle H

On 2/23/06, Fabro, Loic <[hidden email]> wrote:

> I am not 100% sure.... I read that this is what I needed to include....
> I also tried to build it without -fPIC and I get the same result.
> I will try removing the idea support and see what I get.
>
> -- Loic.
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]]On Behalf Of Kyle Hamilton
> Sent: Wednesday, February 22, 2006 11:11 PM
> To: [hidden email]
> Subject: Re: Trying to build OpenSSL 0.9.8a from source
>
>
> Why are you using -fPIC?
>
> -Kyle H
>
> On 2/22/06, Fabro, Loic wrote:
> > Hi All,
> >
> > [Feel free to point me to an FAQ if I missed one; google did not yield any useful result neither]
> >
> > I tried to build OpenSSL from source but after the compilation, the make test returns errors.
> > Where should I start to find what my problem could be? Could the fact that I have a previous version of openSSL on that machine make a difference?
> >
> > cat /proc/version =>
> > Linux version 2.4.20-27.7 ([hidden email]) (gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-126)) #1 Thu Dec 11 14:48:31 EST 2003
> >
> > cat /proc/cpuinfo =>
> > processor       : 0
> > vendor_id       : CyrixInstead
> > cpu family      : 5
> > model           : 2
> > model name      : 6x86 2x Core/Bus Clock
> > stepping        : 7
> > fdiv_bug        : no
> > hlt_bug         : no
> > f00f_bug        : no
> > coma_bug        : yes
> > fpu             : yes
> > fpu_exception   : yes
> > cpuid level     : 1
> > wp              : yes
> > flags           : fpu cyrix_arr
> > bogomips        : 133.12
> >
> > OpenSSL built from source using a
> > ./config --prefix=/usr/local/openssl -fPIC && make && make test
> >
> > extract of the log:
> > ==========
> > input word alignment test 0 1 2 3
> > output word alignment test 0 1 2 3
> > fast crypt test
> > ../util/shlib_wrap.sh ./ideatest
> > ecb idea error encrypting
> > got     :EB 56 DB 71 48 13 B9 73
> > expected:11 FB ED 2B 01 98 6D E5
> > ecb idea error decrypting
> > got     :47 8E 86 68 49 DF 7E 0A
> > expected:00 00 00 01 00 02 00 03
> > cbc idea ok
> > cfb64 idea idea_cfb64_encrypt encrypt error
> > B5EF5B886EBAC9A9
> > 9728211447C9E191
> > 19ACC3AEFEE5CB2F
> > bad
> > make[1]: *** [test_idea] Error 5
> > make[1]: Leaving directory `/opt3/temp/openssl-0.9.8a/test'
> > make: *** [tests] Error 2
> > ==========
> >
> > Thanks,
> > Loic.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Trying to build OpenSSL 0.9.8a from source

wrowe
Fabro, Loic wrote:
> Hum... I remove support for IDEA (and no fPIC) and now the test is segfaulting..

make clean
make depends

?
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

RE: Trying to build OpenSSL 0.9.8a from source

Fabro, Loic
Quick update, I did try that as well (probably forgot before posting my results.... :-( ):
./config --prefix=/usr/local/openssl no-idea no-asm
 
gives me a:
 
Doing ofb
ofb_encrypt encrypt error
29 15 85 50 70 35 06 C4
29 F2 4A 24 70 EB 3D 3F
Doing ofb64
ofb64_encrypt encrypt error
Doing ede_ofb64
ede_ofb64_encrypt encrypt error
Doing cbc_cksum
bad return value (249C444D), should be F7FE62B4
bad cbc_cksum block returned
Doing quad_cksum
input word alignment test 0 1 2 3
output word alignment test 0 1 2 3
fast crypt test fast crypt error, efx1ucqZgl8TI should be efGnQx2725bI2
fast crypt error, yAh.yetncf5jc should be yA1Rp/1hZXIJk
make[1]: *** [test_des] Error 1

________________________________

From: [hidden email] on behalf of William A. Rowe, Jr.
Sent: Fri 2/24/2006 7:55 PM
To: [hidden email]
Subject: Re: Trying to build OpenSSL 0.9.8a from source



Fabro, Loic wrote:
> Hum... I remove support for IDEA (and no fPIC) and now the test is segfaulting..

make clean
make depends



winmail.dat (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Trying to build OpenSSL 0.9.8a from source

Kyle Hamilton
If you have a completely different version of openssl on your system,
that shouldn't make a difference in the test environment.

Try completely removing your source tree and restarting from the pure
tarball.  Also, try getting the latest 0.9.8 snapshot from
ftp://ftp.openssl.org/snapshot/ .

and I would update your compiler, if you are able.

-Kyle H

On 3/1/06, Fabro, Loic <[hidden email]> wrote:

> Quick update, I did try that as well (probably forgot before posting my results.... :-( ):
> ./config --prefix=/usr/local/openssl no-idea no-asm
>
> gives me a:
>
> Doing ofb
> ofb_encrypt encrypt error
> 29 15 85 50 70 35 06 C4
> 29 F2 4A 24 70 EB 3D 3F
> Doing ofb64
> ofb64_encrypt encrypt error
> Doing ede_ofb64
> ede_ofb64_encrypt encrypt error
> Doing cbc_cksum
> bad return value (249C444D), should be F7FE62B4
> bad cbc_cksum block returned
> Doing quad_cksum
> input word alignment test 0 1 2 3
> output word alignment test 0 1 2 3
> fast crypt test fast crypt error, efx1ucqZgl8TI should be efGnQx2725bI2
> fast crypt error, yAh.yetncf5jc should be yA1Rp/1hZXIJk
> make[1]: *** [test_des] Error 1
>
> ________________________________
>
> From: [hidden email] on behalf of William A. Rowe, Jr.
> Sent: Fri 2/24/2006 7:55 PM
> To: [hidden email]
> Subject: Re: Trying to build OpenSSL 0.9.8a from source
>
>
>
> Fabro, Loic wrote:
> > Hum... I remove support for IDEA (and no fPIC) and now the test is segfaulting..
>
> make clean
> make depends
>
>
>
>
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

RE: Trying to build OpenSSL 0.9.8a from source

Fabro, Loic
In reply to this post by Fabro, Loic
I feel so stupid.... Anyway, these ones seem to work:
./config --prefix=/usr/local/openssl no-asm
./config --prefix=/usr/local/openssl no-idea no-asm

What I did wrong in the past (well... well before disabling the assembly part) was:
make depends && make clean && make test && make

What I should have done instead (it's funny how stuff usually is right in front of you.....):
make clean && make depends && make test && make

I will now test with with assembly support, just in case.....

My conclusion to this is: even if you believe you are already doing it, follow blindly what people tell you to try first! Doing make clean and make depends as Kyle told me to do would have fixed the problem...... then I could have tried to understand what I was doing wrong.....

Thanks a lot for your time! :-)

-- Loic.

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]]On Behalf Of Kyle Hamilton
Sent: Thursday, March 02, 2006 12:51 AM
To: [hidden email]
Subject: Re: Trying to build OpenSSL 0.9.8a from source


If you have a completely different version of openssl on your system,
that shouldn't make a difference in the test environment.

Try completely removing your source tree and restarting from the pure
tarball.  Also, try getting the latest 0.9.8 snapshot from
ftp://ftp.openssl.org/snapshot/ .

and I would update your compiler, if you are able.

-Kyle H

On 3/1/06, Fabro, Loic <[hidden email]> wrote:

> Quick update, I did try that as well (probably forgot before posting my results.... :-( ):
> ./config --prefix=/usr/local/openssl no-idea no-asm
>
> gives me a:
>
> Doing ofb
> ofb_encrypt encrypt error
> 29 15 85 50 70 35 06 C4
> 29 F2 4A 24 70 EB 3D 3F
> Doing ofb64
> ofb64_encrypt encrypt error
> Doing ede_ofb64
> ede_ofb64_encrypt encrypt error
> Doing cbc_cksum
> bad return value (249C444D), should be F7FE62B4
> bad cbc_cksum block returned
> Doing quad_cksum
> input word alignment test 0 1 2 3
> output word alignment test 0 1 2 3
> fast crypt test fast crypt error, efx1ucqZgl8TI should be efGnQx2725bI2
> fast crypt error, yAh.yetncf5jc should be yA1Rp/1hZXIJk
> make[1]: *** [test_des] Error 1
>
> ________________________________
>
> From: [hidden email] on behalf of William A. Rowe, Jr.
> Sent: Fri 2/24/2006 7:55 PM
> To: [hidden email]
> Subject: Re: Trying to build OpenSSL 0.9.8a from source
>
>
>
> Fabro, Loic wrote:
> > Hum... I remove support for IDEA (and no fPIC) and now the test is segfaulting..
>
> make clean
> make depends
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Trying to build OpenSSL 0.9.8a from source

Kyle Hamilton
Actually, it was William Rowe Jr., not me.  (I'm pleased you thought
of me, but I much prefer that people get the credit they actually
deserve. :) )

Thanks!  (And thank you for helping, Mr. Rowe. :) )

-Kyle H

On 3/6/06, Fabro, Loic <[hidden email]> wrote:

> I feel so stupid.... Anyway, these ones seem to work:
> ./config --prefix=/usr/local/openssl no-asm
> ./config --prefix=/usr/local/openssl no-idea no-asm
>
> What I did wrong in the past (well... well before disabling the assembly part) was:
> make depends && make clean && make test && make
>
> What I should have done instead (it's funny how stuff usually is right in front of you.....):
> make clean && make depends && make test && make
>
> I will now test with with assembly support, just in case.....
>
> My conclusion to this is: even if you believe you are already doing it, follow blindly what people tell you to try first! Doing make clean and make depends as Kyle told me to do would have fixed the problem...... then I could have tried to understand what I was doing wrong.....
>
> Thanks a lot for your time! :-)
>
> -- Loic.
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]]On Behalf Of Kyle Hamilton
> Sent: Thursday, March 02, 2006 12:51 AM
> To: [hidden email]
> Subject: Re: Trying to build OpenSSL 0.9.8a from source
>
>
> If you have a completely different version of openssl on your system,
> that shouldn't make a difference in the test environment.
>
> Try completely removing your source tree and restarting from the pure
> tarball.  Also, try getting the latest 0.9.8 snapshot from
> ftp://ftp.openssl.org/snapshot/ .
>
> and I would update your compiler, if you are able.
>
> -Kyle H
>
> On 3/1/06, Fabro, Loic <[hidden email]> wrote:
> > Quick update, I did try that as well (probably forgot before posting my results.... :-( ):
> > ./config --prefix=/usr/local/openssl no-idea no-asm
> >
> > gives me a:
> >
> > Doing ofb
> > ofb_encrypt encrypt error
> > 29 15 85 50 70 35 06 C4
> > 29 F2 4A 24 70 EB 3D 3F
> > Doing ofb64
> > ofb64_encrypt encrypt error
> > Doing ede_ofb64
> > ede_ofb64_encrypt encrypt error
> > Doing cbc_cksum
> > bad return value (249C444D), should be F7FE62B4
> > bad cbc_cksum block returned
> > Doing quad_cksum
> > input word alignment test 0 1 2 3
> > output word alignment test 0 1 2 3
> > fast crypt test fast crypt error, efx1ucqZgl8TI should be efGnQx2725bI2
> > fast crypt error, yAh.yetncf5jc should be yA1Rp/1hZXIJk
> > make[1]: *** [test_des] Error 1
> >
> > ________________________________
> >
> > From: [hidden email] on behalf of William A. Rowe, Jr.
> > Sent: Fri 2/24/2006 7:55 PM
> > To: [hidden email]
> > Subject: Re: Trying to build OpenSSL 0.9.8a from source
> >
> >
> >
> > Fabro, Loic wrote:
> > > Hum... I remove support for IDEA (and no fPIC) and now the test is segfaulting..
> >
> > make clean
> > make depends
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [hidden email]
> Automated List Manager                           [hidden email]
>
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: SSL_write() crashes

ashish2881
In reply to this post by Dusty Hendrickson
I am also facing similar kind of issue :
I am trying to send message to host from my system with tls connection .
It's non-blocking case.
i make host unreachable for some time .when i make it up my system crashes .
crash info says : double free issue

0x00000000018e5fee in CRYPTO_free (str=0x2aab0cdf34c8)
0x00000000018d74cd in SSL_free (s=0x2aaaaf93bb48)
                              in SSL_write

Actually SSL_write failing in this case  and i am calling SSL_free after this .I am doing all NULL checks related to host and ssl . Right now i am not ignoring the SIGPIPE .is the problem raised due to this SIGPIPE?
Can anyone help me to identify the possible cause ?

Thanks
Ashish
ashish2881@gmail.com