~ubuntu-branches/ubuntu/gutsy/gnutls13/gutsy-proposed

« back to all changes in this revision

Viewing changes to debian/patches/00CVS_CVE-2006-4790.patch

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Metzler
  • Date: 2006-11-11 10:35:29 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061111103529-0apz2q4w35cgjynh
Tags: 1.4.4-3
Pulled /patches/18_negotiate_cypher.diff from 1.4.5:
When a GnuTLS server receive a SSLv2 Client Hello for an unknown TLS
version, try to negotiate the highest version support by the GnuTLS
server, instead of the lowest.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
diff -Nur gnutls13-1.4.0/lib/x509/verify.c gnutls13-1.4.0.new/lib/x509/verify.c
2
 
--- gnutls13-1.4.0/lib/x509/verify.c    2006-03-08 11:44:59.000000000 +0100
3
 
+++ gnutls13-1.4.0.new/lib/x509/verify.c        2006-09-18 14:22:31.000000000 +0200
4
 
@@ -505,6 +505,19 @@
5
 
       return GNUTLS_E_UNKNOWN_HASH_ALGORITHM;
6
 
     }
7
 
 
8
 
+  len = sizeof (str) - 1;
9
 
+  result = asn1_read_value (dinfo, "digestAlgorithm.parameters", str, &len);
10
 
+  /* To avoid permitting garbage in the parameters field, either the
11
 
+     parameters field is not present, or it contains 0x05 0x00. */
12
 
+  if (!(result == ASN1_ELEMENT_NOT_FOUND ||
13
 
+       (result == ASN1_SUCCESS && len == 2 &&
14
 
+        str[0] == 0x05 && str[1] == 0x00)))
15
 
+    {
16
 
+      gnutls_assert ();
17
 
+      asn1_delete_structure (&dinfo);
18
 
+      return GNUTLS_E_ASN1_GENERIC_ERROR;
19
 
+    }
20
 
+
21
 
   result = asn1_read_value (dinfo, "digest", digest, digest_size);
22
 
   if (result != ASN1_SUCCESS)
23
 
     {