rijndael.c bus error in libgcrypt 1.4.1 on sparc solaris 10

Simon Josefsson simon at josefsson.org
Wed Jun 25 12:44:11 CEST 2008


Werner Koch <wk at gnupg.org> writes:

> On Tue, 27 May 2008 07:45, preeti.shandilya at aricent.com said:
>
>> Attached is config.log :
>> Following is the system information through prtconf
>
> Thanks.  It seems that I would need to debug this.  I have no such
> machine available right now, so this is not easily possible. 
>
> Let's see whether other folks have such a problem too and are able to
> track down the problem.

I got the same problem on Solaris 10 on SPARC with libgcrypt 1.4.1:

my$ ./basic  --debug
Starting Cipher checks.
  checking BLOWFISH [4]
  checking DES [302]
  checking 3DES [2]
  checking CAST5 [3]
  checking AES [7]
Bus Error
my$ 

Program received signal SIGSEGV, Segmentation fault.
0xff328574 in do_decrypt (ctx=0xffbe0210, bx=0xffbe0200 "gC��Q\232���\232x�\t�\021�", ax=0xffbe0200 "gC��Q\232���\232x�\t�\021�")
    at rijndael.c:261
261           *((u32*)w) = *((u32*)U1[w[0]]) ^ *((u32*)U2[w[1]])
(gdb) bt
#0  0xff328574 in do_decrypt (ctx=0xffbe0210, bx=0xffbe0200 "gC��Q\232���\232x�\t�\021�", ax=0xffbe0200 "gC��Q\232���\232x�\t�\021�")
    at rijndael.c:261
#1  0xff328b10 in rijndael_decrypt (context=0xffbe0210, b=0xffbe0200 "gC��Q\232���\232x�\t�\021�", 
    a=0xffbe0200 "gC��Q\232���\232x�\t�\021�") at rijndael.c:679
#2  0xff328ce8 in rijndael_setkey (context=0x56000, key=0xffbe0550 "0123456789abcdef.,;/[]{}-=ABCDEF�9*", keylen=16) at rijndael.c:833
#3  0xff313dd4 in _gcry_cipher_ctl (h=0x55f98, cmd=1, buffer=0xffbe0550, buflen=16) at cipher.c:831
#4  0x000118e4 in check_one_cipher (algo=7, mode=1, flags=16) at basic.c:919
#5  0x0001280c in main (argc=1, argv=0xffbff174) at basic.c:1042
(gdb) 

I don't have time to debug further right now though.

Libgcrypt 1.2.4 works fine.  Some alignment-forcing code appear to have
been removed between those two version.  Another idea is that the
padlock could changed the alignment of some variable.

/Simon



More information about the Gcrypt-devel mailing list