[pkg-gnupg-maint] Bug#824901: gnupg: gpg segfaults
Christoph Egger
christoph at christoph-egger.org
Sat May 21 02:56:13 UTC 2016
Package: gnupg
Version: 2.1.12-1
Severity: normal
Hi!
GPG seems to reproducibly segfault on the command below (at least on
my box). I had a segfault on gpg --import earlier as well but couln't
reproduce after installing debug symbols
Christoph
% gdb --args gpg --list-sigs 0x3B78A32D98BAD5B0
GNU gdb (Debian 7.10-1+b1) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from gpg...Reading symbols from /usr/lib/debug/.build-id/92/0adf736962a3750c4bc48c0f1a09d3f393af8b.debug...done.
done.
(gdb) run
Starting program: /usr/bin/gpg --list-sigs 0x3B78A32D98BAD5B0
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
gpg: checking the trustdb
gpg: removing stale lockfile (created by 17287)
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff74684b5 in ?? () from /lib/x86_64-linux-gnu/libgcrypt.so.20
(gdb) bt full
#0 0x00007ffff74684b5 in ?? () from /lib/x86_64-linux-gnu/libgcrypt.so.20
No symbol table info available.
#1 0x000055555558532f in encode_md_value (pk=pk at entry=0x5555558f5b00, md=md at entry=0x555555d5e320, hash_algo=8) at ../../g10/seskey.c:350
rc = <optimized out>
asn = 0x555555ac69e0 "010\r\006\t`\206H\001e\003\004\002\001\005"
asnlen = 19
frame = <optimized out>
mdlen = <optimized out>
__FUNCTION__ = "encode_md_value"
#2 0x000055555559bc26 in check_signature_end_simple (pk=0x5555558f5b00, sig=0x555555ad3790, digest=0x555555d5e320)
at ../../g10/sig-check.c:461
result = <optimized out>
rc = <optimized out>
digest = 0x555555d5e320
sig = 0x555555ad3790
pk = 0x5555558f5b00
weak = <optimized out>
#3 0x000055555559c80f in check_signature_over_key_or_uid (signer=0x5555558f5b00, sig=sig at entry=0x555555ad3790,
kb=kb at entry=0x555555d0fcb0, packet=packet at entry=0x555555ba6960, is_selfsig=is_selfsig at entry=0x0, ret_pk=ret_pk at entry=0x0)
at ../../g10/sig-check.c:892
rc = <optimized out>
pripk = 0x555555929760
md = 0x555555d5e320
signer_alloced = 0
__FUNCTION__ = "check_signature_over_key_or_uid"
#4 0x000055555559cf32 in check_key_signature2 (root=0x555555d0fcb0, node=node at entry=0x555555898b80, check_pk=check_pk at entry=0x0,
ret_pk=ret_pk at entry=0x0, is_selfsig=is_selfsig at entry=0x0, r_expiredate=r_expiredate at entry=0x0, r_expired=0x0)
at ../../g10/sig-check.c:1075
unode = <optimized out>
pk = 0x555555929760
sig = 0x555555ad3790
algo = <optimized out>
rc = <optimized out>
__FUNCTION__ = "check_key_signature2"
#5 0x000055555559cfd5 in check_key_signature (root=<optimized out>, node=node at entry=0x555555898b80, is_selfsig=is_selfsig at entry=0x0)
at ../../g10/sig-check.c:686
No locals.
#6 0x0000555555584b32 in keyring_rebuild_cache (token=<optimized out>, noisy=noisy at entry=0) at ../../g10/keyring.c:1554
sig = <optimized out>
hd = 0x55555584d1c0
desc = {mode = KEYDB_SEARCH_MODE_NEXT, skipfnc = 0x0, skipfncvalue = 0x0, sn = 0x0, snlen = 0, u = {name = 0x0,
fpr = '\000' <repeats 23 times>, kid = {0, 0}, grip = '\000' <repeats 19 times>}, exact = 0}
keyblock = 0x555555d0fcb0
node = 0x555555898b80
lastresname = 0x555555844f30 "/home/christoph/.gnupg/pubring.gpg"
tmpfp = 0x55555584f470
tmpfilename = 0x55555584f440 "/home/christoph/.gnupg/pubring.gpg.tmp"
bakfilename = 0x55555584f560 "/home/christoph/.gnupg/pubring.gpg~"
rc = <optimized out>
count = 19
sigcount = 19500
#7 0x000055555558155c in keydb_rebuild_caches (noisy=noisy at entry=0) at ../../g10/keydb.c:1775
i = 0
rc = <optimized out>
#8 0x00005555555cea9f in validate_keys (interactive=interactive at entry=0) at ../../g10/trustdb.c:1904
rc = 0
quit = 0
klist = 0x0
k = <optimized out>
keys = 0x0
kar = <optimized out>
kdb = 0x0
node = <optimized out>
depth = <optimized out>
ot_unknown = <optimized out>
ot_undefined = <optimized out>
ot_never = <optimized out>
ot_marginal = <optimized out>
ot_full = <optimized out>
ot_ultimate = <optimized out>
start_time = <optimized out>
next_expire = 0
#9 0x00005555555d0812 in tdb_check_trustdb_stale () at ../../g10/trustdb.c:971
scheduled = <optimized out>
did_nextcheck = 1
#10 0x00005555555ccdc5 in check_trustdb_stale () at ../../g10/trust.c:280
No locals.
#11 0x00005555555a17e8 in public_key_list (ctrl=0x555555844e50, list=0x555555844eb0, locate_mode=0) at ../../g10/keylist.c:133
No locals.
#12 0x00005555555657f9 in main (argc=0, argv=0x7fffffffdb90) at ../../g10/gpg.c:4087
pargs = {argc = 0x7fffffffd6ac, argv = 0x7fffffffd6a0, flags = 32769, err = 0, r_opt = 0, r_type = 0, r = {ret_int = 0,
ret_long = 0, ret_ulong = 0, ret_str = 0x0}, internal = {idx = 2, inarg = 0, stopped = 1,
last = 0x7fffffffded5 "0x3B78A32D98BAD5B0", aliases = 0x0, cur_alias = 0x0, iio_list = 0x0}}
a = <optimized out>
rc = <optimized out>
orig_argc = <optimized out>
orig_argv = <optimized out>
fname = <optimized out>
username = <optimized out>
may_coredump = 0
sl = 0x555555844eb0
remusr = 0x555555843d80
locusr = 0x0
nrings = 0x0
afx = 0x0
detached_sig = 0
configfp = <optimized out>
configname = 0x0
save_configname = <optimized out>
default_configname = 0x555555843790 "/usr/share/locale/en_US.UTF-8.utf8/LC_MESSAGES/gnupg2.mo"
configlineno = 12
parse_debug = 0
default_config = <optimized out>
default_keyring = 1
greeting = 0
nogreeting = 0
logfile = 0x0
use_random_seed = 1
cmd = aListSigs
debug_level = 0x0
trustdb_name = 0x0
def_cipher_string = <optimized out>
def_digest_string = <optimized out>
compress_algo_string = <optimized out>
cert_digest_string = <optimized out>
s2k_cipher_string = <optimized out>
s2k_digest_string = <optimized out>
pers_cipher_list = 0x0
pers_digest_list = 0x555555843c40 "SHA256"
pers_compress_list = 0x0
eyes_only = 0
multifile = 0
pwfd = -1
fpr_maybe_cmd = 0
any_explicit_recipient = 0
require_secmem = 0
got_secmem = 1
malloc_hooks = {malloc = 0x7ffff73b48d0 <gcry_malloc>, realloc = 0x7ffff73b4910 <gcry_realloc>, free = 0x7ffff73b4990 <gcry_free>}
ctrl = 0x555555844e50
-- System Information:
Debian Release: stretch/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.4.0-1-amd64 (SMP w/6 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages gnupg depends on:
ii dpkg 1.18.7
ii gnupg-agent 2.1.12-1
ii install-info 6.1.0.dfsg.1-6
ii libassuan0 2.4.2-3
ii libbz2-1.0 1.0.6-8
ii libc6 2.22-7
ii libgcrypt20 1.7.0-2
ii libgpg-error0 1.22-2
ii libksba8 1.3.4-3
ii libreadline6 6.3-8+b4
ii libsqlite3-0 3.12.2-1
ii zlib1g 1:1.2.8.dfsg-2+b1
Versions of packages gnupg recommends:
ii dirmngr 2.1.11-7
Versions of packages gnupg suggests:
pn gnupg-doc <none>
ii parcimonie 0.9-3
pn xloadimage <none>
-- no debconf information
--
9FED 5C6C E206 B70A 5857 70CA 9655 22B9 D49A E731
Debian Developer | Lisp Hacker | CaCert Assurer
More information about the pkg-gnupg-maint
mailing list