Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Jan 2005 03:31:36 GMT
From:      Daniel Molina Wegener <dmw@unete.cl>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/76588: OpenSSL fails on loading keyfiles from BIO resources
Message-ID:  <200501230331.j0N3VanF032692@www.freebsd.org>
Resent-Message-ID: <200501230340.j0N3eOYm029691@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         76588
>Category:       misc
>Synopsis:       OpenSSL fails on loading keyfiles from BIO resources
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 23 03:40:24 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Daniel Molina Wegener
>Release:        FreeBSD 5.3-RELEASE i386
>Organization:
Daniel Molina Wegener
>Environment:
FreeBSD daemon.unete.cl 5.3-RELEASE FreeBSD 5.3-RELEASE #1: Mon Nov 22 14:52:01 CLST 2004 root@daemon.unete.cl:/usr/src/sys/i386/compile/
PHOBOS i386
>Description:
   OpenSSL has a "bus error" that causes a signal 10 termination.

   The function PEM_read_bio_PrivateKey() in OpenSSL fails on opening
keyfiles in PEM format from memory -- a BIO resource -- where goes
good until tries to use the HASH_UPDATE function (redefined as MD5_Update)
on /usr/src/crypto/openssl/crypto/md32_common.h at line 413.

   Here is the backtrace:

[SNIP]
Program terminated with signal 10, Bus error.
[SNIP]
#0  0x2852c9de in md5_block_host_order () from /lib/libcrypto.so.3
#0  0x2852c9de in md5_block_host_order () from /lib/libcrypto.so.3
#1  0x2852c695 in MD5_Update () from /lib/libcrypto.so.3
#2  0x285246be in EVP_sha1 () from /lib/libcrypto.so.3
#3  0x285249df in EVP_DigestUpdate () from /lib/libcrypto.so.3
#4  0x28515455 in EVP_BytesToKey () from /lib/libcrypto.so.3
#5  0x28513a84 in PEM_do_header () from /lib/libcrypto.so.3
#6  0x285132f4 in PEM_bytes_read_bio () from /lib/libcrypto.so.3
#7  0x284c7330 in PEM_read_bio_PrivateKey () from /lib/libcrypto.so.3
#8  0x284359c8 in xmlSecOpenSSLAppKeyLoadBIO ()
   from /usr/local/lib/libxmlsec1-openssl.so
#9  0x2843563a in xmlSecOpenSSLAppKeyLoad ()
   from /usr/local/lib/libxmlsec1-openssl.so
#10 0x280977d7 in xmlSecCryptoAppKeyLoad () from /usr/local/lib/libxmlsec1.so.3
#11 0x0804e2bd in xmlSecAppCryptoSimpleKeysMngrKeyAndCertsLoad ()
#12 0x0804bec2 in xmlSecAppLoadKeys ()
#13 0x0804a1da in main ()

>How-To-Repeat:
1. Install the XMLSec port ports/security/xmlsec1
2. Deinstall the port (only xmlsec1)
2. Download ftp://ftp.xmlsoft.org/xmlsec/releases/xmlsec1-1.2.6.tar.gz
3. Install the following packages (from the ports collection)
   - automake-1.5_2,1
   - automake-1.4.6_1
   - autoconf-2.53_3
4. Unpack the xmlsec-1.2.6 package
5. Run the commands to build the configure script
   $ aclocal15 -I /usr/local/share/aclocal
   $ automake14 --add-missing
   $ autoconf253
6. Configure the package:
   $ ./configure --without-gnutls --without-nss --without-nspr \
   --prefix=/usr/local --build=i386-testbld-freebsd5.3
7. Run gmake:
   $ gmake && gmake install
8. run the tests in the tests directory of the XMLSec 1.2.6
   distribution.

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200501230331.j0N3VanF032692>