[Pkg-gnutls-commits] r627 - in /packages/gnutls13/branches/1.4.etch/debian: changelog patches/19_GNUTLS-SA-2008.diff

ametzler at users.alioth.debian.org ametzler at users.alioth.debian.org
Sat Nov 22 10:59:13 UTC 2008


Author: ametzler
Date: Sat Nov 22 10:59:13 2008
New Revision: 627

URL: http://svn.debian.org/wsvn/pkg-gnutls/?sc=1&rev=627
Log:
import stable security upload 1.4.4-3+etch1

Added:
    packages/gnutls13/branches/1.4.etch/debian/patches/19_GNUTLS-SA-2008.diff
Modified:
    packages/gnutls13/branches/1.4.etch/debian/changelog

Modified: packages/gnutls13/branches/1.4.etch/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnutls/packages/gnutls13/branches/1.4.etch/debian/changelog?rev=627&op=diff
==============================================================================
--- packages/gnutls13/branches/1.4.etch/debian/changelog (original)
+++ packages/gnutls13/branches/1.4.etch/debian/changelog Sat Nov 22 10:59:13 2008
@@ -1,3 +1,14 @@
+gnutls13 (1.4.4-3+etch1) stable-security; urgency=high
+
+  * Apply patch from Simon Josefsson to fix three security vulnerabilities
+    (GNUTLS-SA-2008-1):
+    - Fix crash when sending invalid server name (GNUTLS-SA-2008-1-1)
+    - Fix crash when sending repeated client hellos (GNUTLS-SA-2008-1-2)
+    - Fix crash in cipher padding decoding for invalid record lengths
+      (GNUTLS-SA-2008-1-3)
+
+ -- Florian Weimer <fw at deneb.enyo.de>  Tue, 20 May 2008 09:57:16 +0200
+
 gnutls13 (1.4.4-3) unstable; urgency=low
 
   * Pulled /patches/18_negotiate_cypher.diff from 1.4.5:

Added: packages/gnutls13/branches/1.4.etch/debian/patches/19_GNUTLS-SA-2008.diff
URL: http://svn.debian.org/wsvn/pkg-gnutls/packages/gnutls13/branches/1.4.etch/debian/patches/19_GNUTLS-SA-2008.diff?rev=627&op=file
==============================================================================
--- packages/gnutls13/branches/1.4.etch/debian/patches/19_GNUTLS-SA-2008.diff (added)
+++ packages/gnutls13/branches/1.4.etch/debian/patches/19_GNUTLS-SA-2008.diff Sat Nov 22 10:59:13 2008
@@ -1,0 +1,93 @@
+diff --git a/lib/ext_server_name.c b/lib/ext_server_name.c
+index f9ca429..c72fba7 100644
+--- a/lib/ext_server_name.c
++++ b/lib/ext_server_name.c
+@@ -74,10 +74,27 @@ _gnutls_server_name_recv_params (gnutls_session_t session,
+ 	  len = _gnutls_read_uint16 (p);
+ 	  p += 2;
+ 
+-	  DECR_LENGTH_RET (data_size, len, 0);
+-	  server_names++;
++	  if (len > 0)
++	    {
++	      DECR_LENGTH_RET (data_size, len, 0);
++	      server_names++;
++	      p += len;
++	    }
++	  else
++	    _gnutls_handshake_log
++	      ("HSK[%x]: Received zero size server name (under attack?)\n",
++	       session);
+ 
+-	  p += len;
++	}
++
++      /* we cannot accept more server names.
++       */
++      if (server_names > MAX_SERVER_NAME_EXTENSIONS)
++	{
++	  _gnutls_handshake_log
++	    ("HSK[%x]: Too many server names received (under attack?)\n",
++	     session);
++	  server_names = MAX_SERVER_NAME_EXTENSIONS;
+ 	}
+ 
+       session->security_parameters.extensions.server_names_size =
+@@ -85,10 +102,6 @@ _gnutls_server_name_recv_params (gnutls_session_t session,
+       if (server_names == 0)
+ 	return 0;		/* no names found */
+ 
+-      /* we cannot accept more server names.
+-       */
+-      if (server_names > MAX_SERVER_NAME_EXTENSIONS)
+-	server_names = MAX_SERVER_NAME_EXTENSIONS;
+ 
+       p = data + 2;
+       for (i = 0; i < server_names; i++)
+diff --git a/lib/gnutls_cipher.c b/lib/gnutls_cipher.c
+index b2420f7..6c7e8e8 100644
+--- a/lib/gnutls_cipher.c
++++ b/lib/gnutls_cipher.c
+@@ -496,17 +496,20 @@ _gnutls_ciphertext2compressed (gnutls_session_t session,
+ 
+       pad = ciphertext.data[ciphertext.size - 1] + 1;	/* pad */
+ 
+-      length = ciphertext.size - hash_size - pad;
+-
+-      if (pad > ciphertext.size - hash_size)
++      if ((int)pad > (int)ciphertext.size - hash_size)
+ 	{
+ 	  gnutls_assert ();
++	  _gnutls_record_log
++	    ("REC[%x]: Short record length %d > %d - %d (under attack?)\n",
++	     session, pad, ciphertext.size, hash_size);
+ 	  /* We do not fail here. We check below for the
+ 	   * the pad_failed. If zero means success.
+ 	   */
+ 	  pad_failed = GNUTLS_E_DECRYPTION_FAILED;
+ 	}
+ 
++      length = ciphertext.size - hash_size - pad;
++
+       /* Check the pading bytes (TLS 1.x)
+        */
+       if (ver >= GNUTLS_TLS1 && pad_failed == 0)
+diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c
+index 66cec0a..9916994 100644
+--- a/lib/gnutls_handshake.c
++++ b/lib/gnutls_handshake.c
+@@ -929,6 +929,14 @@ _gnutls_recv_handshake_header (gnutls_session_t session,
+ 
+       *recv_type = session->internals.handshake_header_buffer.recv_type;
+ 
++      if (*recv_type != type)
++	{
++	  gnutls_assert ();
++	  _gnutls_handshake_log
++	    ("HSK[%x]: Handshake type mismatch (under attack?)\n", session);
++	  return GNUTLS_E_UNEXPECTED_HANDSHAKE_PACKET;
++	}
++
+       return session->internals.handshake_header_buffer.packet_length;
+     }
+ 




More information about the Pkg-gnutls-commits mailing list