~ubuntu-branches/ubuntu/lucid/openssl/lucid-security

« back to all changes in this revision

Viewing changes to debian/patches/CVE-2014-3572.patch

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2015-01-09 11:16:50 UTC
  • Revision ID: package-import@ubuntu.com-20150109111650-y2372iikqlq6prj3
Tags: 0.9.8k-7ubuntu8.23
* SECURITY UPDATE: denial of service via unexpected handshake when
  no-ssl3 build option is used (not the default)
  - debian/patches/CVE-2014-3569.patch: keep the old method for now in
    ssl/s23_srvr.c.
  - CVE-2014-3569
* SECURITY UPDATE: bignum squaring may produce incorrect results
  - debian/patches/CVE-2014-3570.patch: fix bignum logic in
    crypto/bn/asm/mips3.s, crypto/bn/asm/x86_64-gcc.c,
    crypto/bn/bn_asm.c, added test to crypto/bn/bntest.c.
  - CVE-2014-3570
* SECURITY UPDATE: DTLS segmentation fault in dtls1_get_record
  - debian/patches/CVE-2014-3571.patch: fix crash in ssl/d1_pkt.c,
    ssl/s3_pkt.c.
  - CVE-2014-3571
* SECURITY UPDATE: ECDHE silently downgrades to ECDH [Client]
  - debian/patches/CVE-2014-3572.patch: don't skip server key exchange in
    ssl/s3_clnt.c.
  - CVE-2014-3572
* SECURITY UPDATE: certificate fingerprints can be modified
  - debian/patches/CVE-2014-8275.patch: fix various fingerprint issues in
    crypto/asn1/a_bitstr.c, crypto/asn1/a_type.c, crypto/asn1/a_verify.c,
    crypto/asn1/asn1.h, crypto/asn1/asn1_err.c, crypto/asn1/x_algor.c,
    crypto/dsa/dsa_asn1.c, crypto/ecdsa/ecs_vrf.c, crypto/x509/x509.h,
    crypto/x509/x_all.c, util/libeay.num.
  - CVE-2014-8275
* SECURITY UPDATE: RSA silently downgrades to EXPORT_RSA [Client]
  - debian/patches/CVE-2015-0204.patch: only allow ephemeral RSA keys in
    export ciphersuites in ssl/d1_srvr.c, ssl/s3_clnt.c, ssl/s3_srvr.c,
    ssl/ssl.h, adjust documentation in doc/ssl/SSL_CTX_set_options.pod,
    doc/ssl/SSL_CTX_set_tmp_rsa_callback.pod.
  - CVE-2015-0204

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From e42a2abadc90664e2615dc63ba7f79cf163f780a Mon Sep 17 00:00:00 2001
 
2
From: "Dr. Stephen Henson" <steve@openssl.org>
 
3
Date: Fri, 24 Oct 2014 12:30:33 +0100
 
4
Subject: [PATCH] ECDH downgrade bug fix.
 
5
 
 
6
Fix bug where an OpenSSL client would accept a handshake using an
 
7
ephemeral ECDH ciphersuites with the server key exchange message omitted.
 
8
 
 
9
Thanks to Karthikeyan Bhargavan for reporting this issue.
 
10
 
 
11
CVE-2014-3572
 
12
Reviewed-by: Matt Caswell <matt@openssl.org>
 
13
 
 
14
(cherry picked from commit b15f8769644b00ef7283521593360b7b2135cb63)
 
15
 
 
16
Conflicts:
 
17
        CHANGES
 
18
        ssl/s3_clnt.c
 
19
---
 
20
 CHANGES       |    7 +++++++
 
21
 ssl/s3_clnt.c |   15 +++++++++++++--
 
22
 2 files changed, 20 insertions(+), 2 deletions(-)
 
23
 
 
24
Index: openssl-0.9.8k/ssl/s3_clnt.c
 
25
===================================================================
 
26
--- openssl-0.9.8k.orig/ssl/s3_clnt.c   2015-01-09 11:14:28.542516654 -0500
 
27
+++ openssl-0.9.8k/ssl/s3_clnt.c        2015-01-09 11:14:28.538516618 -0500
 
28
@@ -1111,8 +1111,21 @@
 
29
 
 
30
        if (!ok) return((int)n);
 
31
 
 
32
+       alg=s->s3->tmp.new_cipher->algorithms;
 
33
+       EVP_MD_CTX_init(&md_ctx);
 
34
+
 
35
        if (s->s3->tmp.message_type != SSL3_MT_SERVER_KEY_EXCHANGE)
 
36
                {
 
37
+               /*
 
38
+                * Can't skip server key exchange if this is an ephemeral
 
39
+                * ciphersuite.
 
40
+                */
 
41
+               if (alg & (SSL_kEDH|SSL_kECDHE))
 
42
+                       {
 
43
+                       SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE, SSL_R_UNEXPECTED_MESSAGE);
 
44
+                       al = SSL_AD_UNEXPECTED_MESSAGE;
 
45
+                       goto f_err;
 
46
+                       }
 
47
                s->s3->tmp.reuse_message=1;
 
48
                return(1);
 
49
                }
 
50
@@ -1149,8 +1162,6 @@
 
51
                }
 
52
 
 
53
        param_len=0;
 
54
-       alg=s->s3->tmp.new_cipher->algorithms;
 
55
-       EVP_MD_CTX_init(&md_ctx);
 
56
 
 
57
 #ifndef OPENSSL_NO_RSA
 
58
        if (alg & SSL_kRSA)