From owner-freebsd-bugs@FreeBSD.ORG Sun Jan 23 03:40:25 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0F7DD16A4CE for ; Sun, 23 Jan 2005 03:40:25 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 966A743D45 for ; Sun, 23 Jan 2005 03:40:24 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j0N3eOBG029692 for ; Sun, 23 Jan 2005 03:40:24 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j0N3eOYm029691; Sun, 23 Jan 2005 03:40:24 GMT (envelope-from gnats) Resent-Date: Sun, 23 Jan 2005 03:40:24 GMT Resent-Message-Id: <200501230340.j0N3eOYm029691@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Daniel Molina Wegener Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F012F16A4CE for ; Sun, 23 Jan 2005 03:31:36 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id B442F43D3F for ; Sun, 23 Jan 2005 03:31:36 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j0N3VaiW032693 for ; Sun, 23 Jan 2005 03:31:36 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j0N3VanF032692; Sun, 23 Jan 2005 03:31:36 GMT (envelope-from nobody) Message-Id: <200501230331.j0N3VanF032692@www.freebsd.org> Date: Sun, 23 Jan 2005 03:31:36 GMT From: Daniel Molina Wegener To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: misc/76588: OpenSSL fails on loading keyfiles from BIO resources X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Jan 2005 03:40:25 -0000 >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: