Home GnuPG
Diffusion GnuPG 6f032181ba78

gpg: Fix segv due to NULL value stored as opaque MPI
6f032181ba78Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

gpg: Fix segv due to NULL value stored as opaque MPI

* g10/build-packet.c (do_secret_key): Check for NULL return from
gcry_mpi_get_opaque.
* g10/keyid.c (hash_public_key): Ditto.

This is a backport of 76c8122adfed0f0f443cce7bda702ba2b39661b3 from
master to the STABLE-BRANCH-1-4

On the STABLE-BRANCH-1-4, we may also want to patch g10/seckey-cert.c,
but that has not been done in this patch.

This fix extends commmit 0835d2f44ef62eab51fce6a927908f544e01cf8f.

gpg2 --export --no-default-keyring --keyring TESTDATA

With TESTDATA being below after unpacking.

-----BEGIN PGP ARMORED FILE-----

mBMEhdkMmS8BcX8F8F5voEhQAQmBMEnAAAZwAAo4D/f/8EhQAAAIAEnP8EhQAQ
iBMEnP8AAAAABf8jIID
/8EhQYQmBMEnIUAEIgTBKT/AAAAAAUAACCA/f//BIUA
EJgTBJx/AP8ABPPzBJx/AP8ABPPz

2yE0

-----END PGP ARMORED FILE-----

[dkg: rebased to STABLE-BRANCH-1-4]

  • Reported-by: Jodie Cunningham
  • Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>

Details

Provenance
dkgAuthored on Feb 22 2015, 5:10 AM
wernerCommitted on Feb 23 2015, 10:56 AM
Parents
rGa35ed8af41a9: gpg: Remove an unused variable.
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rG6f032181ba78: gpg: Fix segv due to NULL value stored as opaque MPI (authored by Daniel Kahn Gillmor <dkg@fifthhorseman.net>).Feb 23 2015, 10:56 AM