~ubuntu-branches/ubuntu/natty/mutt/natty-updates

« back to all changes in this revision

Viewing changes to debian/patches/ubuntu/CVE-2011-1429.patch

  • Committer: Package Import Robot
  • Author(s): Tyler Hicks
  • Date: 2011-09-21 17:06:30 UTC
  • Revision ID: package-import@ubuntu.com-20110921170630-z8srwsya4kt9kk1r
Tags: 1.5.21-2ubuntu3.1
* SECURITY UPDATE: Failure to verify that a server's hostname matches the
  Common Name listed in a certificate when setting up a TLS connection.
  - debian/patches/ubuntu/CVE-2011-1429.patch: Verify the peer's certificate.
  - CVE-2011-1429

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From: Honza Horak <hhorak@redhat.com>
 
2
Description: This patch addresses a security problem due to the fact that the
 
3
 validation of the SSL CN is not correctly done in the gnutls-related code of
 
4
 mutt.
 
5
 .
 
6
 This patch has not been applied in the upstream mutt source. It is currently
 
7
 carried by Debian (1.5.21-5), Red Hat (1.5.20-2.20091214hg736b6a.el6_1.1) and,
 
8
 presumably, others. It was originally posted in the upstream mutt BTS by Honza
 
9
 Horak.
 
10
Bug: http://bugs.mutt.org/3506
 
11
Bug-Debian: http://bugs.debian.org/619216
 
12
Bug-Redhat: https://bugzilla.redhat.com/688755
 
13
Origin: other, http://bugs.mutt.org/3506#comment:8
 
14
Applied-Upstream: no
 
15
 
 
16
Index: mutt-1.5.21/mutt_ssl_gnutls.c
 
17
===================================================================
 
18
--- mutt-1.5.21.orig/mutt_ssl_gnutls.c  2010-08-25 11:31:40.000000000 -0500
 
19
+++ mutt-1.5.21/mutt_ssl_gnutls.c       2011-09-21 16:58:55.938857051 -0500
 
20
@@ -978,6 +978,7 @@
 
21
   unsigned int cert_list_size = 0;
 
22
   gnutls_certificate_status certstat;
 
23
   int certerr, i, preauthrc, savedcert, rc = 0;
 
24
+  int rcpeer;
 
25
 
 
26
   if (gnutls_auth_get_type (state) != GNUTLS_CRD_CERTIFICATE)
 
27
   {
 
28
@@ -1003,6 +1004,9 @@
 
29
   for (i = 0; i < cert_list_size; i++) {
 
30
     rc = tls_check_preauth(&cert_list[i], certstat, conn->account.host, i,
 
31
                            &certerr, &savedcert);
 
32
+    if (i ==0)
 
33
+      rcpeer = rc;
 
34
+
 
35
     preauthrc += rc;
 
36
 
 
37
     if (savedcert)
 
38
@@ -1028,7 +1032,7 @@
 
39
         dprint (1, (debugfile, "error trusting certificate %d: %d\n", i, rc));
 
40
 
 
41
       certstat = tls_verify_peers (state);
 
42
-      if (!certstat)
 
43
+      if (!certstat && !rcpeer)
 
44
         return 1;
 
45
     }
 
46
   }