[svn] GnuPG - r4713 - in trunk: . g10

svn author wk cvs at cvs.gnupg.org
Tue Mar 25 09:33:35 CET 2008


Author: wk
Date: 2008-03-25 09:33:31 +0100 (Tue, 25 Mar 2008)
New Revision: 4713

Modified:
   trunk/NEWS
   trunk/g10/ChangeLog
   trunk/g10/import.c
   trunk/g10/options.skel
   trunk/g10/parse-packet.c
Log:
Fix bug 894.
Change default keyserver.
Allow key protection with Camellia.


Modified: trunk/g10/ChangeLog
===================================================================
--- trunk/g10/ChangeLog	2008-03-24 02:28:40 UTC (rev 4712)
+++ trunk/g10/ChangeLog	2008-03-25 08:33:31 UTC (rev 4713)
@@ -1,3 +1,15 @@
+2008-03-25  David Shaw  <dshaw at jabberwocky.com>  (wk)
+
+	* import.c (collapse_uids): Fix bug 894: possible memory
+	corruption around deduplication of user IDs.
+
+2008-03-25  Werner Koch  <wk at g10code.com>
+
+	* parse-packet.c (parse_key): Parse a secret key encrypted with
+	Camellia.
+
+	* options.skel: Make the default keyserver keys.gnupg.net.
+
 2008-03-18  Werner Koch  <wk at g10code.com>
 
 	* seckey-cert.c (do_check): Use GCRYMPI_FMT_PGP for v3 keys.

Modified: trunk/NEWS
===================================================================
--- trunk/NEWS	2008-03-24 02:28:40 UTC (rev 4712)
+++ trunk/NEWS	2008-03-25 08:33:31 UTC (rev 4713)
@@ -12,6 +12,8 @@
 
  * Fixed a bug in the ambigious name detection.
 
+ * Fixed possible memory corruption while importing OpenPGP keys.
+
  * Minor bug fixes.
 
 

Modified: trunk/g10/import.c
===================================================================
--- trunk/g10/import.c	2008-03-24 02:28:40 UTC (rev 4712)
+++ trunk/g10/import.c	2008-03-25 08:33:31 UTC (rev 4713)
@@ -1661,11 +1661,17 @@
     {
       KBNODE uid2;
 
+      if(is_deleted_kbnode(uid1))
+	continue;
+
       if(uid1->pkt->pkttype!=PKT_USER_ID)
 	continue;
 
       for(uid2=uid1->next;uid2;uid2=uid2->next)
 	{
+	  if(is_deleted_kbnode(uid2))
+	    continue;
+
 	  if(uid2->pkt->pkttype!=PKT_USER_ID)
 	    continue;
 
@@ -1681,6 +1687,9 @@
 		 uid1 */
 	      for(last=uid2;last->next;last=last->next)
 		{
+		  if(is_deleted_kbnode(last))
+		    continue;
+
 		  if(last->next->pkt->pkttype==PKT_USER_ID
 		     || last->next->pkt->pkttype==PKT_PUBLIC_SUBKEY
 		     || last->next->pkt->pkttype==PKT_SECRET_SUBKEY)
@@ -1693,13 +1702,16 @@
 	      /* Now put uid2 in place as part of uid1 */
 	      last->next=uid1->next;
 	      uid1->next=uid2;
-	      remove_kbnode(keyblock,uid2);
+	      delete_kbnode(uid2);
 
 	      /* Now dedupe uid1 */
 	      for(sig1=uid1->next;sig1;sig1=sig1->next)
 		{
 		  KBNODE sig2;
 
+		  if(is_deleted_kbnode(sig1))
+		    continue;
+
 		  if(sig1->pkt->pkttype==PKT_USER_ID
 		     || sig1->pkt->pkttype==PKT_PUBLIC_SUBKEY
 		     || sig1->pkt->pkttype==PKT_SECRET_SUBKEY)
@@ -1710,6 +1722,9 @@
 
 		  for(sig2=sig1->next,last=sig1;sig2;last=sig2,sig2=sig2->next)
 		    {
+		      if(is_deleted_kbnode(sig2))
+			continue;
+
 		      if(sig2->pkt->pkttype==PKT_USER_ID
 			 || sig2->pkt->pkttype==PKT_PUBLIC_SUBKEY
 			 || sig2->pkt->pkttype==PKT_SECRET_SUBKEY)
@@ -1723,7 +1738,7 @@
 			{
 			  /* We have a match, so delete the second
 			     signature */
-			  remove_kbnode(&uid1,sig2);
+			  delete_kbnode(sig2);
 			  sig2=last;
 			}
 		    }
@@ -1732,6 +1747,8 @@
 	}
     }
 
+  commit_kbnode(keyblock);
+
   if(any && !opt.quiet)
     {
       const char *key="???";

Modified: trunk/g10/options.skel
===================================================================
--- trunk/g10/options.skel	2008-03-24 02:28:40 UTC (rev 4712)
+++ trunk/g10/options.skel	2008-03-25 08:33:31 UTC (rev 4713)
@@ -98,7 +98,8 @@
 # servers can be HKP, email, or LDAP (if GnuPG is built with LDAP
 # support).
 #
-# Example HKP keyserver:
+# Example HKP keyservers:
+#      hkp://keys.gnupg.net
 #      hkp://subkeys.pgp.net
 #
 # Example email keyserver:
@@ -121,11 +122,12 @@
 # Note that most servers (with the notable exception of
 # ldap://keyserver.pgp.com) synchronize changes with each other.  Note
 # also that a single server name may actually point to multiple
-# servers via DNS round-robin.  hkp://subkeys.pgp.net is an example of
+# servers via DNS round-robin.  hkp://keys.gnupg.net is an example of
 # such a "server", which spreads the load over a number of physical
-# servers.
+# servers.  To see the IP address of the server actually used, you may use
+# the "--keyserver-options debug".
 
-keyserver hkp://subkeys.pgp.net
+keyserver hkp://keys.gnupg.net
 #keyserver mailto:pgp-public-keys at keys.nl.pgp.net
 #keyserver ldap://pgp.surfnet.nl:11370
 #keyserver ldap://keyserver.pgp.com

Modified: trunk/g10/parse-packet.c
===================================================================
--- trunk/g10/parse-packet.c	2008-03-24 02:28:40 UTC (rev 4712)
+++ trunk/g10/parse-packet.c	2008-03-25 08:33:31 UTC (rev 4713)
@@ -1906,8 +1906,9 @@
 	     * enlarge temp.
 	     */
 	    switch( sk->protect.algo ) {
-	      case 7: case 8: case 9: /* reserved for AES */
+	      case 7: case 8: case 9: /* AES */
 	      case 10: /* Twofish */
+              case 11: case 12: /* Camellia */
 		sk->protect.ivlen = 16;
 		break;
 	      default:




More information about the Gnupg-commits mailing list