Home GnuPG
Diffusion GnuPG d07de3862710

g10: Fix find_and_check_key for multiple keyrings.

Description

g10: Fix find_and_check_key for multiple keyrings.

* g10/pkclist.c (find_and_check_key): Call get_validity on a specific
keyblock.

When we have multiple keyrings, get_validity after
get_best_pubkey_byname should access same keyring. Or else, the
situation of an expired key in keyring A but valid key in keyring B
causes SEGV.

Thanks to Guido Günther for the use case and the log.

  • Debian-bug-id: #878812
  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on Oct 19 2017, 4:08 AM
wernerCommitted on Oct 19 2017, 3:03 PM
Parents
rG7c73db3d31c6: gpg: Keep a lock during the read-update/insert cycle in import.
Branches
Unknown
Tags
Unknown