Hi

I wrote the public key information as binary data into a file named
buffer.der. Unfortunately the command as shown also gives the segment
violation for ssl 0.9.8a version. The same openssl command from 0.9.7d works
fine. Let me know I can do more tests to help find out the fix.

/home/srbkit/srbpkg/ssl/64.8a/install/bin/openssl x509 -inform DER -in
buffer.der

The gdb output looks like below (I will compile ssl in debug mode and send
you more information if necessary). Also I will try to compare the 0.9.7d
and 0.9.8a code and see I can get to any where.

[srbkit@charm:license]$ gdb
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "ia64-suse-linux".
(gdb) file /home/srbkit/srbpkg/ssl/64.8a/install/bin/openssl
Reading symbols from
/local/tmp/srbkit/srbpkg/ssl/64.8a/install/bin/openssl...done.
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) r x509 -inform DER -in buffer.der
Starting program: /local/tmp/srbkit/srbpkg/ssl/64.8a/install/bin/openssl
x509 -inform DER -in buffer.der

Program received signal SIGSEGV, Segmentation fault.
0x400000000014f0a0 in x509_name_ex_d2i ()
(gdb) where
#0 0x400000000014f0a0 in x509_name_ex_d2i ()
#1 0x4000000000160a90 in ASN1_item_ex_d2i ()
#2 0x400000000015fbd0 in asn1_template_noexp_d2i ()
#3 0x4000000000160220 in asn1_template_ex_d2i ()
#4 0x4000000000160680 in ASN1_item_ex_d2i ()
#5 0x400000000015fbd0 in asn1_template_noexp_d2i ()
#6 0x4000000000160220 in asn1_template_ex_d2i ()
#7 0x4000000000160680 in ASN1_item_ex_d2i ()
#8 0x4000000000161640 in ASN1_item_d2i ()
#9 0x4000000000148a10 in ASN1_item_d2i_bio ()
#10 0x40000000001873f0 in d2i_X509_bio ()
#11 0x4000000000058da0 in load_cert ()
#12 0x4000000000031c30 in x509_main ()
#13 0x40000000000039e0 in do_cmd ()
#14 0x4000000000004bf0 in main ()
(gdb)


-----Original Message-----
From: postmaster@Merkur.SBone.TU-Cottbus.De
[mailtoostmaster@Merkur.SBone.TU-Cottbus.De] On Behalf Of Stephen Henson
via RT
Sent: Friday, March 17, 2006 9:42 AM
To: sam.sharma@gat.com
Cc: openssl-dev@openssl.org
Subject: [openssl.org #1296] openssl 0.9.8a/0.9.7g crashes on IA64

[sam.sharma@gat.com - Fri Mar 17 18:31:13 2006]:

>
> The opensll gives a segment violation as shown below. I tested this crash
> with 0.9.8a/0.9.7g. Fortunately 0.9.7d crash does not happen which I am
> using for my application. I do not know about 0.9.7h/0.9.7i versions.
>
>
>
> [Thread debugging using libthread_db enabled]
>
> [New Thread 2305843009213969632 (LWP 2576)]
>
>
>
> Program received signal SIGSEGV, Segmentation fault.
>
> [Switching to Thread 2305843009213969632 (LWP 2576)]
>
> 0x40000000001e90a0 in x509_name_ex_d2i ()
>
> (gdb) where
>
> #0 0x40000000001e90a0 in x509_name_ex_d2i ()
>
> #1 0x4000000000197a40 in ASN1_item_ex_d2i ()
>
> #2 0x4000000000196b80 in asn1_template_noexp_d2i ()
>
> #3 0x40000000001971d0 in asn1_template_ex_d2i ()
>
> #4 0x4000000000197630 in ASN1_item_ex_d2i ()
>
> #5 0x4000000000196b80 in asn1_template_noexp_d2i ()
>
> #6 0x40000000001971d0 in asn1_template_ex_d2i ()
>
> #7 0x4000000000197630 in ASN1_item_ex_d2i ()
>
> #8 0x40000000001985f0 in ASN1_item_d2i ()
>
> #9 0x40000000001e36b0 in ASN1_item_d2i_bio ()
>
> #10 0x400000000019fe40 in d2i_X509_bio ()
>
> #11 0x400000000000a8d0 in srbOpensslVerifyDERBuffer
> (certificateDERBuffer=0x6000000000004b80 "0\202\002,0\202\001\002\001",
>
> certificateDERBufferLen=560,
>


Unfortunately OpenSSL hasn't been compiled with debugging symbols so
that doesn't help much. There seems to be a crash when its reading a
certificate DN but that's about all I can tell.

What would help is if you could dump the 560 bytes at
certificateDERBuffer to a file and then see if you get a crash with:

openssl x509 -inform DER -in buffer.der


__________________________________________________ ____________________
OpenSSL Project http://www.openssl.org
Development Mailing List openssl-dev@openssl.org
Automated List Manager majordomo@openssl.org