Bug 217138

Summary: Wrong library initialization causes errors
Product: [Fedora] Fedora Reporter: Walery Studennikov <despairr>
Component: perl-Crypt-SSLeayAssignee: Robin Norwood <robin.norwood>
Status: CLOSED ERRATA QA Contact:
Severity: urgent Docs Contact:
Priority: medium    
Version: 6CC: danhanks, perl-devel, tmraz
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 0.56-1.fc7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-08-29 17:29:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 240502    
Attachments:
Description Flags
Fixed patch that makes things working none

Description Walery Studennikov 2006-11-24 09:34:43 UTC
Description of problem:
Usage of Crypt::SSLeay, for example when making https requests via LWP using
client certificates - causes errors. At least on AMD x86_64 architecture.

Version-Release number of selected component (if applicable):
Crypt-SSLeay-0.51

How reproducible:

Make HTTPS request via LWP using client certificate
(use $ENV{HTTPS_CERT_FILE} and $ENV{HTTPS_KEY_FILE})
with Crypt::SSLeay module installed.
For example, request to https://w3s.webmoney.ru/asp/XMLOperationsCert.asp.
  
Actual results:

You will get a segfault on x86_64 architecture.

Expected results:

Successful request.

Additional info:

In perl-Crypt-SSLeay-0.51-9.2.2.1.src.rpm there is a patch file
perl-Crypt-SSLeay-openssl-098.patch for Crypt-SSLeay-0.51.
This patch file should be modified: you should place SSL_library_init() call
INSTEAD of SSLeay_add_all_algorithms(). Not after it.

Links to discussions about the problem:

http://www.nntp.perl.org/group/perl.libwww/6722
http://www.mail-archive.com/libwww@perl.org/msg06114.html
http://rt.cpan.org/Public/Bug/Display.html?id=16735

Comment 1 Walery Studennikov 2006-11-24 09:34:44 UTC
Created attachment 142052 [details]
Fixed patch that makes things working

Comment 2 Robin Norwood 2006-11-27 18:14:39 UTC
Thanks for the patch, Walery.  The fixed package should be available in
updates-testing soon.

Comment 3 Fedora Update System 2006-11-27 22:14:49 UTC
perl-Crypt-SSLeay-0.51-12.fc6 has been pushed for fc6, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.

Comment 4 Fedora Update System 2006-12-11 16:40:42 UTC
perl-Crypt-SSLeay-0.51-12.fc6 has been pushed for fc6, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.

Comment 5 Tomas Mraz 2007-06-18 19:03:11 UTC
The bugfix caused regression - bug 240502.

I think that it is correct to call both OpenSSL_add_all_algorithms() (the
SSLeay_add_all_algorithms() is just a #define referencing this) and
SSL_library_init(). I don't know why calling both should cause the segfaults and
actually I cannot reproduce the segfaults here when I recompile the
perl-Crypt-SSLeay with the patch modified to call both functions.


Comment 6 Fedora Update System 2007-08-24 05:29:58 UTC
perl-Crypt-SSLeay-0.56-1.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Robin Norwood 2007-08-24 14:52:45 UTC
Can someone test the above version and let me know how it works for you? 
Especially on x86_64 systems as described above.

x86_64 version:
http://download.fedora.redhat.com/pub/fedora/linux/updates/testing/7/x86_64/perl-Crypt-SSLeay-0.56-1.fc7.x86_64.rpm

x86 version:
http://download.fedora.redhat.com/pub/fedora/linux/updates/testing/7/i386/perl-Crypt-SSLeay-0.56-1.fc7.i386.rpm

(or just enable your updates testing repo and use yum)



Comment 8 Fedora Update System 2007-08-29 17:29:52 UTC
perl-Crypt-SSLeay-0.56-1.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.