[git] GnuPG - branch, master, updated. gnupg-2.1.0-45-g1c21403

by Werner Koch cvs at cvs.gnupg.org
Wed Nov 26 10:20:30 CET 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  1c2140346d6ef9c35e303099d2d15be57869b4d5 (commit)
      from  8445ef24fc31e1fe0291e17f90f9f06b536e34da (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1c2140346d6ef9c35e303099d2d15be57869b4d5
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Nov 26 10:21:01 2014 +0100

    gpg: Change a bug() call to a regular error message.
    
    * g10/decrypt-data.c (decrypt_data): Return an error code instead of
    calling BUG().
    --
    
    This code path can be triggered by fuzzing gpg and thus with some
    likeness also by corrupt messages for other reasons.

diff --git a/g10/decrypt-data.c b/g10/decrypt-data.c
index 9c6ae73..03d38c9 100644
--- a/g10/decrypt-data.c
+++ b/g10/decrypt-data.c
@@ -130,7 +130,12 @@ decrypt_data (ctrl_t ctrl, void *procctx, PKT_encrypted *ed, DEK *dek)
     log_fatal ("unsupported blocksize %u\n", blocksize );
   nprefix = blocksize;
   if ( ed->len && ed->len < (nprefix+2) )
-    BUG();
+    {
+       /* An invalid message.  We can't check that during parsing
+          because we may not know the used cipher then.  */
+      rc = gpg_error (GPG_ERR_INV_PACKET);
+      goto leave;
+    }
 
   if ( ed->mdc_method )
     {

-----------------------------------------------------------------------

Summary of changes:
 g10/decrypt-data.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list