[pkg-gnupg-maint] Bug#878812: Bug#878812: hits bug_at when encrypting to 1A6F3E639A4467E8C3476525DF6D76C44D696F6B
Guido Günther
agx at sigxcpu.org
Tue Oct 17 06:40:33 UTC 2017
Hi Niibe,
On Tue, Oct 17, 2017 at 12:50:37PM +0900, NIIBE Yutaka wrote:
> Guido Günther <agx at sigxcpu.org> wrote:
> >> > #4 0x0000556a0f29306f bug_at (gpg)
> >> > #5 0x0000556a0f243c1e do_we_trust (gpg)
> >> > #6 0x0000556a0f243fff find_and_check_key (gpg)
> >> > #7 0x0000556a0f2455b6 find_and_check_key (gpg)
> >> > #8 0x0000556a0f24b6c2 encrypt_crypt (gpg)
> >> > #9 0x0000556a0f203563 main (gpg)
> >> > #10 0x00007fd58eee12e1 __libc_start_main (libc.so.6)
> >> > #11 0x0000556a0f2054da _start (gpg)
> [...]
> > I can trivially reproduce this without having mutt involved like:
> >
> > $ gpg --encrypt --armor --always-trust -r 1A6F3E639A4467E8C3476525DF6D76C44D696F6B
> > gpg: Ohhhh jeeee: ... this is a bug (../../g10/pkclist.c:417:do_we_trust)
> > Aborted (core dumped)
> >
> > Where the above key is from the debian-keyring package.
>
> Could you please try with --debug=8192 option (debug for key lookup)?
>
> Here, I cannot replicate with Debian's gnupg 2.2.1-2.
>
> When key search, it failed as expired, and it didn't go the code path to
> do_we_trust.
>
> ====================
> $ /usr/bin/gpg --debug=8192 --encrypt --armor --always-trust -r 1A6F3E639A4467E8C3476525DF6D76C44D696F6B
> gpg: enabled debug flags: lookup
> gpg: DBG: keydb_search: 1 search descriptions:
> gpg: DBG: keydb_search 0: FPR20: '1A6F 3E63 9A44 67E8 C347 6525 DF6D 76C4 4D69 6F6B'
> gpg: DBG: keydb_search: searching keybox (resource 0 of 1)
> gpg: DBG: keydb_search: searched keybox (resource 0 of 1) => Success
> gpg: DBG: finish_lookup: checking key 4D696F6B (all)(req_usage=2)
> gpg: DBG: checking subkey ED764C3A
> gpg: DBG: subkey has expired
> gpg: DBG: checking subkey 217028C2
> gpg: DBG: usage does not match: want=2 have=1
> gpg: DBG: no suitable subkeys found - trying primary
> gpg: DBG: primary key usage does not match: want=2 have=5
> gpg: DBG: no suitable key found - giving up
> gpg: DBG: keydb_search: 1 search descriptions:
> gpg: DBG: keydb_search 0: FPR20: '1A6F 3E63 9A44 67E8 C347 6525 DF6D 76C4 4D69 6F6B'
> gpg: DBG: keydb_search: searching keybox (resource 0 of 1)
> gpg: DBG: keydb_search: searched keybox (resource 0 of 1) => EOF
> gpg: 1A6F3E639A4467E8C3476525DF6D76C44D696F6B: skipped: Unusable public key
> gpg: [stdin]: encryption failed: Unusable public key
> gpg: secmem usage: 0/65536 bytes in 0 blocks
> $
> ====================
Debug log attached.
Cheers,
-- Guido
-------------- next part --------------
gpg: reading options from '/home/agx/.gnupg.laptop/gpg.conf'
gpg: enabled debug flags: lookup
gpg: DBG: keydb_search: 1 search descriptions:
gpg: DBG: keydb_search 0: LONG_KID: '0A6F5640ADE263B0'
gpg: DBG: keydb_search: searching keyring (resource 0 of 2)
gpg: DBG: keyring_search: need_uid = 0; need_words = 0; need_keyid = 1; need_fpr = 0; any_skip = 0
gpg: DBG: keyring_search: initializing offset table. (need_keyid: 1 => 1)
gpg: DBG: keyring_search: searching from start of resource.
gpg: DBG: keyring_search: packet starting at offset 905631 matched descriptor 0
gpg: DBG: keyring_search: returning success
gpg: DBG: keydb_search: searched keyring (resource 0 of 2) => Success
gpg: DBG: finish_lookup: checking key 8C8DDBD2 (one)(req_usage=2)
gpg: DBG: checking subkey ADE263B0
gpg: DBG: subkey might be fine
gpg: DBG: using key ADE263B0
gpg: DBG: keydb_search: 1 search descriptions:
gpg: DBG: keydb_search 0: LONG_KID: '582CB5D4BD9B5F48'
gpg: DBG: keydb_search: searching keyring (resource 0 of 2)
gpg: DBG: keyring_search: need_uid = 0; need_words = 0; need_keyid = 1; need_fpr = 0; any_skip = 0
gpg: DBG: keyring_search: initializing offset table. (need_keyid: 1 => 1)
gpg: DBG: keyring_search: searching from start of resource.
gpg: DBG: keyring_search: packet starting at offset 15866521 matched descriptor 0
gpg: DBG: keyring_search: returning success
gpg: DBG: keydb_search: searched keyring (resource 0 of 2) => Success
gpg: DBG: finish_lookup: checking key 584122D3 (one)(req_usage=2)
gpg: DBG: checking subkey BD9B5F48
gpg: DBG: subkey might be fine
gpg: DBG: using key BD9B5F48
gpg: DBG: keydb_search: 1 search descriptions:
gpg: DBG: keydb_search 0: LONG_KID: 'CF5E40F944572038'
gpg: DBG: keydb_search: searching keyring (resource 0 of 2)
gpg: DBG: keyring_search: need_uid = 0; need_words = 0; need_keyid = 1; need_fpr = 0; any_skip = 0
gpg: DBG: keyring_search: initializing offset table. (need_keyid: 1 => 1)
gpg: DBG: keyring_search: searching from start of resource.
gpg: DBG: keyring_search: packet starting at offset 15863739 matched descriptor 0
gpg: DBG: keyring_search: returning success
gpg: DBG: keydb_search: searched keyring (resource 0 of 2) => Success
gpg: DBG: finish_lookup: checking key 584122D3 (one)(req_usage=2)
gpg: DBG: checking subkey 44572038
gpg: DBG: subkey might be fine
gpg: DBG: using key 44572038
gpg: DBG: keydb_search: 1 search descriptions:
gpg: DBG: keydb_search 0: FPR20: '1A6F 3E63 9A44 67E8 C347 6525 DF6D 76C4 4D69 6F6B'
gpg: DBG: keydb_search: searching keyring (resource 0 of 2)
gpg: DBG: keyring_search: need_uid = 0; need_words = 0; need_keyid = 0; need_fpr = 1; any_skip = 0
gpg: DBG: keyring_search: initializing offset table. (need_keyid: 0 => 1)
gpg: DBG: keyring_search: searching from start of resource.
gpg: DBG: keyring_search: packet starting at offset 9247805 matched descriptor 0
gpg: DBG: keyring_search: returning success
gpg: DBG: keydb_search: searched keyring (resource 0 of 2) => Success
gpg: DBG: finish_lookup: checking key 4D696F6B (all)(req_usage=2)
gpg: DBG: checking subkey ED764C3A
gpg: DBG: subkey has expired
gpg: DBG: checking subkey 217028C2
gpg: DBG: usage does not match: want=2 have=1
gpg: DBG: no suitable subkeys found - trying primary
gpg: DBG: primary key usage does not match: want=2 have=5
gpg: DBG: no suitable key found - giving up
gpg: DBG: keydb_search: 1 search descriptions:
gpg: DBG: keydb_search 0: FPR20: '1A6F 3E63 9A44 67E8 C347 6525 DF6D 76C4 4D69 6F6B'
gpg: DBG: keydb_search: searching keyring (resource 0 of 2)
gpg: DBG: keyring_search: need_uid = 0; need_words = 0; need_keyid = 0; need_fpr = 1; any_skip = 0
gpg: DBG: keyring_search: initializing offset table. (need_keyid: 0 => 1)
gpg: DBG: keyring_search: not searching from start of resource.
gpg: DBG: keyring_search: no matches (EOF)
gpg: DBG: keydb_search: searched keyring (resource 0 of 2) => EOF
gpg: DBG: keydb_search: searching keyring (resource 1 of 2)
gpg: DBG: keyring_search: need_uid = 0; need_words = 0; need_keyid = 0; need_fpr = 1; any_skip = 0
gpg: DBG: keyring_search: initializing offset table. (need_keyid: 0 => 1)
gpg: DBG: keyring_search: searching from start of resource.
gpg: DBG: keyring_search: packet starting at offset 27104390 matched descriptor 0
gpg: DBG: keyring_search: returning success
gpg: DBG: keydb_search: searched keyring (resource 1 of 2) => Success
gpg: DBG: finish_lookup: checking key 4D696F6B (all)(req_usage=2)
gpg: DBG: checking subkey ED764C3A
gpg: DBG: subkey might be fine
gpg: DBG: checking subkey 217028C2
gpg: DBG: usage does not match: want=2 have=1
gpg: DBG: using key ED764C3A
gpg: DBG: keydb_search: 1 search descriptions:
gpg: DBG: keydb_search 0: LONG_KID: 'DF6D76C44D696F6B'
gpg: DBG: keydb_search: searching keyring (resource 0 of 2)
gpg: DBG: keyring_search: need_uid = 0; need_words = 0; need_keyid = 1; need_fpr = 0; any_skip = 0
gpg: DBG: keyring_search: initializing offset table. (need_keyid: 1 => 1)
gpg: DBG: keyring_search: searching from start of resource.
gpg: DBG: keyring_search: packet starting at offset 9247805 matched descriptor 0
gpg: DBG: keyring_search: returning success
gpg: DBG: keydb_search: searched keyring (resource 0 of 2) => Success
gpg: DBG: finish_lookup: checking key 4D696F6B (one)(req_usage=0)
gpg: DBG: using key 4D696F6B
gpg: Ohhhh jeeee: ... this is a bug (../../g10/pkclist.c:417:do_we_trust)
More information about the pkg-gnupg-maint
mailing list