[git] GnuPG - branch, STABLE-BRANCH-1-4, updated. gnupg-1.4.17-6-gc05918c
by Werner Koch
cvs at cvs.gnupg.org
Mon Jun 30 20:26:54 CEST 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, STABLE-BRANCH-1-4 has been updated
via c05918c1b92bbf4f8cce0f18508014bfcf6332d8 (commit)
via 6a7b763e05d352a08f639d5eef9d0bac01c5c456 (commit)
via aae7ec516b79e20938c56fd48fc0bc9d2116426c (commit)
via 955524f4359ba9e9de213f4067c38df9ae4808a8 (commit)
via 574b9ed28d83a98b9c002b349de651236b86ac24 (commit)
from ba50a006302cee62376f1c7bf11a08dad14f41ff (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 c05918c1b92bbf4f8cce0f18508014bfcf6332d8
Author: Werner Koch <wk at gnupg.org>
Date: Wed Jun 25 14:33:34 2014 +0200
Post release updates
--
diff --git a/NEWS b/NEWS
index 78de9ed..5e12a86 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+Noteworthy changes in version 1.4.19 (unreleased)
+-------------------------------------------------
+
+
Noteworthy changes in version 1.4.18 (2014-06-30)
-------------------------------------------------
diff --git a/README b/README
index 4a07839..c1847a6 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
GnuPG - The GNU Privacy Guard
-------------------------------
- Version 1.4.18
+ Version 1.4.19
Copyright 1998, 1999, 2000, 2001, 2002, 2003,
2004, 2005, 2006, 2007, 2008, 2009,
diff --git a/configure.ac b/configure.ac
index 96f09d7..ae63a4a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,7 +27,7 @@ min_automake_version="1.9.3"
# (git tag -s gnupg-1.n.m) and run "./autogen.sh --force". Please
# bump the version number immediately *after* the release and do
# another commit and push so that the git magic is able to work.
-m4_define([mym4_version], [1.4.18])
+m4_define([mym4_version], [1.4.19])
# Below is m4 magic to extract and compute the git revision number,
# the decimalized short revision number, a beta version string and a
commit 6a7b763e05d352a08f639d5eef9d0bac01c5c456
Author: Werner Koch <wk at gnupg.org>
Date: Wed Jun 25 14:33:34 2014 +0200
Release 1.4.18
diff --git a/NEWS b/NEWS
index 15154c3..78de9ed 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,12 @@
-Noteworthy changes in version 1.4.18 (unreleased)
+Noteworthy changes in version 1.4.18 (2014-06-30)
-------------------------------------------------
+ * Fix a regression in 1.4.17 if more than one keyid is given
+ to --recv-keys et al.
+
+ * Cap RSA and Elgamal keysize at 4096 bit also for unattended key
+ generation.
+
Noteworthy changes in version 1.4.17 (2014-06-23)
-------------------------------------------------
commit aae7ec516b79e20938c56fd48fc0bc9d2116426c
Author: Werner Koch <wk at gnupg.org>
Date: Wed Jun 25 20:25:28 2014 +0200
Limit keysize for unattended key generation to useful values.
* g10/keygen.c (gen_elg): Enforce keysize 1024 to 4096.
(gen_rsa): Enforce keysize 1024 to 4096.
(gen_dsa): Enforce keysize 768 to 3072.
--
It was possible to create 16k RSA keys in batch mode. In addition to
the silliness of such keys, they have the major drawback that GnuPG,
with its limited amount of specially secured memory areas, the use of
such keys may lead to an "out of secure memory" condition.
diff --git a/g10/keygen.c b/g10/keygen.c
index b84dd0b..84f852f 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -1039,10 +1039,14 @@ gen_elg(int algo, unsigned nbits, KBNODE pub_root, KBNODE sec_root, DEK *dek,
assert( is_ELGAMAL(algo) );
- if( nbits < 512 ) {
+ if (nbits < 1024) {
nbits = 2048;
log_info(_("keysize invalid; using %u bits\n"), nbits );
}
+ else if (nbits > 4096) {
+ nbits = 4096;
+ log_info(_("keysize invalid; using %u bits\n"), nbits );
+ }
if( (nbits % 32) ) {
nbits = ((nbits + 31) / 32) * 32;
@@ -1121,7 +1125,7 @@ gen_dsa(unsigned int nbits, KBNODE pub_root, KBNODE sec_root, DEK *dek,
MPI *factors;
unsigned int qbits;
- if( nbits < 512)
+ if( nbits < 768)
{
nbits = 2048;
log_info(_("keysize invalid; using %u bits\n"), nbits );
@@ -1256,6 +1260,10 @@ gen_rsa(int algo, unsigned nbits, KBNODE pub_root, KBNODE sec_root, DEK *dek,
nbits = 2048;
log_info(_("keysize invalid; using %u bits\n"), nbits );
}
+ else if (nbits > 4096) {
+ nbits = 4096;
+ log_info(_("keysize invalid; using %u bits\n"), nbits );
+ }
if( (nbits % 32) ) {
nbits = ((nbits + 31) / 32) * 32;
commit 955524f4359ba9e9de213f4067c38df9ae4808a8
Author: Werner Koch <wk at gnupg.org>
Date: Wed Jun 25 14:33:34 2014 +0200
Make screening of keyserver result work with multi-key commands.
* g10/keyserver.c (ks_retrieval_filter_arg_s): new.
(keyserver_retrieval_filter): Use new struct and check all
descriptions.
(keyserver_spawn): Pass filter arg suing the new struct.
--
This is a fix for commit 52303043.
The old code did only work for a single key. It failed as soon as
several keys are specified ("gpg --refresh-keys" or "gpg --recv-key A
B C").
diff --git a/g10/keyserver.c b/g10/keyserver.c
index dca5e18..af174fb 100644
--- a/g10/keyserver.c
+++ b/g10/keyserver.c
@@ -960,13 +960,25 @@ direct_uri_map(const char *scheme,unsigned int is_direct)
#define KEYSERVER_ARGS_NOKEEP " -o \"%o\" \"%i\""
+/* Structure to convey the arg to keyserver_retrieval_filter. */
+struct ks_retrieval_filter_arg_s
+{
+ KEYDB_SEARCH_DESC *desc;
+ int ndesc;
+};
+
+
/* Check whether a key matches the search description. The filter
returns 0 if the key shall be imported. Note that this kind of
filter is not related to the iobuf filters. */
static int
-keyserver_retrieval_filter (PKT_public_key *pk, PKT_secret_key *sk, void *arg)
+keyserver_retrieval_filter (PKT_public_key *pk, PKT_secret_key *sk,
+ void *opaque)
{
- KEYDB_SEARCH_DESC *desc = arg;
+ struct ks_retrieval_filter_arg_s *arg = opaque;
+ KEYDB_SEARCH_DESC *desc = arg->desc;
+ int ndesc = arg->ndesc;
+ int n;
u32 keyid[2];
byte fpr[MAX_FINGERPRINT_LEN];
size_t fpr_len = 0;
@@ -975,32 +987,40 @@ keyserver_retrieval_filter (PKT_public_key *pk, PKT_secret_key *sk, void *arg)
if (sk)
return G10ERR_GENERAL;
+ if (!ndesc)
+ return 0; /* Okay if no description given. */
+
fingerprint_from_pk (pk, fpr, &fpr_len);
keyid_from_pk (pk, keyid);
/* Compare requested and returned fingerprints if available. */
- if (desc->mode == KEYDB_SEARCH_MODE_FPR20)
- {
- if (fpr_len != 20 || memcmp (fpr, desc->u.fpr, 20))
- return G10ERR_GENERAL;
- }
- else if (desc->mode == KEYDB_SEARCH_MODE_FPR16)
+ for (n = 0; n < ndesc; n++)
{
- if (fpr_len != 16 || memcmp (fpr, desc->u.fpr, 16))
- return G10ERR_GENERAL;
- }
- else if (desc->mode == KEYDB_SEARCH_MODE_LONG_KID)
- {
- if (keyid[0] != desc->u.kid[0] || keyid[1] != desc->u.kid[1])
- return G10ERR_GENERAL;
- }
- else if (desc->mode == KEYDB_SEARCH_MODE_SHORT_KID)
- {
- if (keyid[1] != desc->u.kid[1])
- return G10ERR_GENERAL;
+ if (desc[n].mode == KEYDB_SEARCH_MODE_FPR20)
+ {
+ if (fpr_len == 20 && !memcmp (fpr, desc[n].u.fpr, 20))
+ return 0;
+ }
+ else if (desc[n].mode == KEYDB_SEARCH_MODE_FPR16)
+ {
+ if (fpr_len == 16 && !memcmp (fpr, desc[n].u.fpr, 16))
+ return 0;
+ }
+ else if (desc[n].mode == KEYDB_SEARCH_MODE_LONG_KID)
+ {
+ if (keyid[0] == desc[n].u.kid[0] && keyid[1] == desc[n].u.kid[1])
+ return 0;
+ }
+ else if (desc[n].mode == KEYDB_SEARCH_MODE_SHORT_KID)
+ {
+ if (keyid[1] == desc[n].u.kid[1])
+ return 0;
+ }
+ else
+ return 0;
}
- return 0;
+ return G10ERR_GENERAL;
}
@@ -1540,6 +1560,7 @@ keyserver_spawn(enum ks_action action,STRLIST list,KEYDB_SEARCH_DESC *desc,
case KS_GETNAME:
{
void *stats_handle;
+ struct ks_retrieval_filter_arg_s filterarg;
stats_handle=import_new_stats_handle();
@@ -1552,11 +1573,12 @@ keyserver_spawn(enum ks_action action,STRLIST list,KEYDB_SEARCH_DESC *desc,
that we don't allow the import of secret keys from a
keyserver. Keyservers should never accept or send them
but we better protect against rogue keyservers. */
-
+ filterarg.desc = desc;
+ filterarg.ndesc = count;
import_keys_stream (spawn->fromchild, stats_handle, fpr, fpr_len,
(opt.keyserver_options.import_options
| IMPORT_NO_SECKEY),
- keyserver_retrieval_filter, desc);
+ keyserver_retrieval_filter, &filterarg);
import_print_stats(stats_handle);
import_release_stats_handle(stats_handle);
commit 574b9ed28d83a98b9c002b349de651236b86ac24
Author: Werner Koch <wk at gnupg.org>
Date: Tue Jun 24 20:12:26 2014 +0200
Add CVE number
--
diff --git a/NEWS b/NEWS
index a78109b..15154c3 100644
--- a/NEWS
+++ b/NEWS
@@ -5,7 +5,7 @@ Noteworthy changes in version 1.4.18 (unreleased)
Noteworthy changes in version 1.4.17 (2014-06-23)
-------------------------------------------------
- * Avoid DoS due to garbled compressed data packets.
+ * Avoid DoS due to garbled compressed data packets. [CVE-2014-4617]
* Screen keyserver reponses to avoid import of unwanted keys by rogue
servers.
-----------------------------------------------------------------------
Summary of changes:
NEWS | 14 ++++++++++--
README | 2 +-
configure.ac | 2 +-
g10/keygen.c | 12 ++++++++--
g10/keyserver.c | 68 ++++++++++++++++++++++++++++++++++++-------------------
5 files changed, 69 insertions(+), 29 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list