Page MenuHome GnuPG

gpg --export --armor FINGERPRINT, endless output
Closed, ResolvedPublic

Description

On my system (FreeBSD-10.1-PRERELEASE) the following command

$ gpg --export --armor FINGERPRINT

causes an endless output of ASCII characters, and ~100% of CPU usage.

$ gpg --export --armor [KEY-ID|USER-ID]

works fine.

  • Environment --

$ gpg --version
gpg (GnuPG) 2.1.0
libgcrypt 1.6.1
Copyright (C) 2014 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.

Home: ~/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,

CAMELLIA128, CAMELLIA192, CAMELLIA256

Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2

$ ldd /usr/local/bin/gpg
/usr/local/bin/gpg:
libz.so.6 => /lib/libz.so.6 (0x8008ce000)
libbz2.so.4 => /usr/lib/libbz2.so.4 (0x800ae4000)
libintl.so.9 => /usr/local/lib/libintl.so.9 (0x800cf6000)
libgcrypt.so.20 => /usr/local/lib/libgcrypt.so.20 (0x800eff000)
libgpg-error.so.0 => /usr/local/lib/libgpg-error.so.0 (0x8011d1000)
libreadline.so.6 => /usr/local/lib/libreadline.so.6 (0x8013e1000)
libksba.so.8 => /usr/local/lib/libksba.so.8 (0x80162b000)
libassuan.so.0 => /usr/local/lib/libassuan.so.0 (0x801862000)
libc.so.7 => /lib/libc.so.7 (0x801a73000)
libncurses.so.8 => /lib/libncurses.so.8 (0x801e1d000)

$ uname -a
FreeBSD mnemosine-amd64.domo.sva 10.1-PRERELEASE FreeBSD 10.1-PRERELEASE #18
r274300: Sun Nov 9 00:26:06 CET 2014 root@mnemosine-amd64.domo.sva:/usr/
obj/usr/src/sys/MNEMOSINE amd64

Details

Version
2.1.0

Event Timeline

aheinecke set Version to 2.1.0.

I've opened T1775 and only afterwards noticed that this issue did aleardy
exist ;-)

So here is my mesage from T1775 which further qualifies this issue:

This bug was reported by fersingb on IRC, I could reproduce it.

If you have a public keyring in the .kbx format exporting a key with the full
keyid produces an endless output stream.

To reproduce it I can import any key into a newly created gnupg homedir.
When exporting this again using the fingerprint as identifier the bug is triggered.

My usual gnupghome was automatically migrated still has a pubring.gpg and works.

Setup:
FAKEHOME=$(mktemp -d)
gpg2 --armor --export CA308D95A6332F7056B4DFD194F78CF1265059CD | gpg2 --homedir
$FAKEHOME --import

Triggering the bug:

gpg2 --homedir $FAKEHOME --armor --export CA308D95A6332F7056B4DFD194F78CF1265059CD

The short fingerprint works:

gpg2 --homedir $FAKEHOME --armor --export 265059CD

My current version is yesterdays master (2.1.1-beta45) but the original reporter
used gnupg-2.1.0.

Can you test it with the latest git version or the beta at
ftp://ftp.gnupg.org/people/werner/scratch/gnupg-2.1.1-beta35.tar.bz2
?

As I wrote in T1774 (aheinecke on Nov 27 2014, 05:42 PM / Roundup)
I reproduced this Bug with 2.1.1-beta45

I confirm what said by aheinecke. The bug is still there with 2.1.1-beta45 on my
system too.

aheinecke removed a project: Restricted Project.

confirmed

I can confirm it too. Thank you for this fix.