ports/53508: security/newpg: gpgsm dumps core (while installing security/gpgme)

Alexey Neyman alex.neyman at auriga.ru
Thu Jun 19 19:10:23 UTC 2003


>Number:         53508
>Category:       ports
>Synopsis:       security/newpg: gpgsm dumps core (while installing security/gpgme)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 19 12:10:18 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Alexey Neyman
>Release:        FreeBSD 5.1-BETA i386
>Organization:
Private
>Environment:
System: FreeBSD vagabond.auriga.ru 5.1-BETA FreeBSD 5.1-BETA #0: Mon May 26 20:19:31 MSD 2003 avn at vagabond.auriga.ru:/usr/obj/usr/src/sys/VAGABOND i386

>Description:
While installing the security/gpgme port, the installation failed
while testing /usr/local/bin/gpgsm (which, however, belongs to the
security/newpg port). The security/newpg port also performs testing,
but the negative results are ignored and do not prevent port's
installation.

FWIW, I had CPUTYPE=i686 in the /etc/make.conf, so I disabled it and
added -g. The resulting binaries receive SIGBUS as well. I ran the
failing command under GDB, the session script is below:

bash-2.05b# cd /usr/ports/security/gpgme/work/gpgme-0.3.15/tests/gpgsm
bash-2.05b# LANG=C LD_LIBRARY_PATH=../../../../../libksba/work/libksba-0.4.7/src/.libs gdb ../../../../../newpg/work/newpg-0.9.4/sm/gpgsm
GNU gdb 5.2.1 (FreeBSD)
Copyright 2002 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 "i386-undermydesk-freebsd"...
(gdb) r --homedir . --import cert_g10code_test1.der
Starting program: /usr/ports/security/newpg/work/newpg-0.9.4/sm/gpgsm --homedir . --import cert_g10code_test1.der

Program received signal SIGBUS, Bus error.
0x280df4eb in _ksba_ber_decoder_decode (d=0x8075100, start_name=0x0, r_root=0x807408c, r_image=0x0,
    r_imagelen=0x0) at ber-decoder.c:1070
1070                  node->off = (ksba_reader_tell (d->reader)
(gdb) bt
#0  0x280df4eb in _ksba_ber_decoder_decode (d=0x8075100, start_name=0x0, r_root=0x807408c, r_image=0x0,
    r_imagelen=0x0) at ber-decoder.c:1070
#1  0x280e0651 in ksba_cert_read_der (cert=0x8074080, reader=0x8074040) at cert.c:149
#2  0x0805bf23 in import_one (ctrl=0xbfbff8bc, stats=0xbfbff7e0, in_fd=0) at import.c:275
#3  0x0805c0e3 in gpgsm_import_files (ctrl=0xbfbff8bc, nfiles=1, files=0xbfbff97c, of=0x804d730 <open_read>)
    at import.c:334
#4  0x0804d46e in main (argc=1, argv=0xbfbff97c) at gpgsm.c:1268
#5  0x0804ba05 in _start ()
(gdb) l
1065          node = d->val.node;
1066          if (node && d->use_image)
1067            {
1068              if (!d->val.is_endtag)
1069                { /* We don't have nodes for the end tag - so don't store it */
1070                  node->off = (ksba_reader_tell (d->reader)
1071                               - d->val.nhdr - startoff);
1072                  node->nhdr = d->val.nhdr;
1073                  node->len = d->val.length;
1074                  if (node->type == TYPE_ANY)
(gdb) f 1
#1  0x280e0651 in ksba_cert_read_der (cert=0x8074080, reader=0x8074040) at cert.c:149
149       err = _ksba_ber_decoder_decode (decoder, "TMTTv2.Certificate",
(gdb) l
144
145       err = _ksba_ber_decoder_set_module (decoder, cert->asn_tree);
146       if (err)
147          goto leave;
148
149       err = _ksba_ber_decoder_decode (decoder, "TMTTv2.Certificate",
150                                       &cert->root, &cert->image, &cert->imagelen);
151       if (!err)
152           cert->initialized = 1;
153
(gdb) f 0
#0  0x280df4eb in _ksba_ber_decoder_decode (d=0x8075100, start_name=0x0, r_root=0x807408c, r_image=0x0,
    r_imagelen=0x0) at ber-decoder.c:1070
1070                  node->off = (ksba_reader_tell (d->reader)
(gdb) p d
$1 = (struct ber_decoder_s *) 0x8075100
(gdb) p d->reader
$2 = (struct ksba_reader_s *) 0x8074040
(gdb) p node
$3 = (struct asn_node_struct *) 0x280dc2cf

Is there any information I should be providing?
(all port versions are current as of now)

>How-To-Repeat:
	See above.

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



More information about the freebsd-ports-bugs mailing list