Home GnuPG
Diffusion GnuPG d837f6b0eadb

gpg: Do not abort on certain invalid packets.
d837f6b0eadbUnpublished

Unpublished Commit · Learn More

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

Description

gpg: Do not abort on certain invalid packets.

* g10/build-packet.c (write_fake_data): Check for non-opaque data.
* g10/seskey.c (do_encode_md): Return NULL instead of abort.

The first may happen if the usage flags of an algorithm do not match
the allowed usage. When writing a backsig this would lead to a
log_bug in libgcrypt due to the use of a regular MPI as opaque data.

The second may happen with all kind of invalid data. It is easy to
avoid an abort, though.

  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Jun 2 2016, 3:14 PM
Parents
rG072acb69be55: common: New function openpgp_is_curve_supported.
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rGd837f6b0eadb: gpg: Do not abort on certain invalid packets. (authored by Werner Koch <wk@gnupg.org>).Jun 2 2016, 3:57 PM