misc/76588: OpenSSL fails on loading keyfiles from BIO resources

Daniel Molina Wegener dmw at unete.cl
Sat Jan 22 19:40:25 PST 2005

>Number:         76588
>Category:       misc
>Synopsis:       OpenSSL fails on loading keyfiles from BIO resources
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 23 03:40:24 GMT 2005
>Originator:     Daniel Molina Wegener
>Release:        FreeBSD 5.3-RELEASE i386
Daniel Molina Wegener
FreeBSD daemon.unete.cl 5.3-RELEASE FreeBSD 5.3-RELEASE #1: Mon Nov 22 14:52:01 CLST 2004 root at daemon.unete.cl:/usr/src/sys/i386/compile/
   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:

Program terminated with signal 10, Bus error.
#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 ()

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



More information about the freebsd-bugs mailing list