summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Kuster <akuster@mvista.com>2016-09-23 23:13:04 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-10-06 08:46:32 +0100
commit963c69e1e8e9cefccccb59619cb07ee31f07ffa1 (patch)
tree06e5e6646b3908a033e3760e9214c667b2d0a2c7
parentbf3918d613b6b2a9707af1eb3c253d23f84d09a3 (diff)
downloadopenembedded-core-963c69e1e8e9cefccccb59619cb07ee31f07ffa1.tar.gz
openembedded-core-963c69e1e8e9cefccccb59619cb07ee31f07ffa1.tar.bz2
openembedded-core-963c69e1e8e9cefccccb59619cb07ee31f07ffa1.zip
openssl: Security fix CVE-2016-6302
affects openssl < 1.0.1i Signed-off-by: Armin Kuster <akuster@mvista.com>
-rw-r--r--meta/recipes-connectivity/openssl/openssl/CVE-2016-6302.patch53
-rw-r--r--meta/recipes-connectivity/openssl/openssl_1.0.2h.bb1
2 files changed, 54 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl/CVE-2016-6302.patch b/meta/recipes-connectivity/openssl/openssl/CVE-2016-6302.patch
new file mode 100644
index 0000000000..a72ee700bc
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl/CVE-2016-6302.patch
@@ -0,0 +1,53 @@
+From baaabfd8fdcec04a691695fad9a664bea43202b6 Mon Sep 17 00:00:00 2001
+From: "Dr. Stephen Henson" <steve@openssl.org>
+Date: Tue, 23 Aug 2016 18:14:54 +0100
+Subject: [PATCH] Sanity check ticket length.
+
+If a ticket callback changes the HMAC digest to SHA512 the existing
+sanity checks are not sufficient and an attacker could perform a DoS
+attack with a malformed ticket. Add additional checks based on
+HMAC size.
+
+Thanks to Shi Lei for reporting this bug.
+
+CVE-2016-6302
+
+Reviewed-by: Rich Salz <rsalz@openssl.org>
+
+Upstream-Status: Backport
+CVE: CVE-2016-6302
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+---
+ ssl/t1_lib.c | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+Index: openssl-1.0.2h/ssl/t1_lib.c
+===================================================================
+--- openssl-1.0.2h.orig/ssl/t1_lib.c
++++ openssl-1.0.2h/ssl/t1_lib.c
+@@ -3397,9 +3397,7 @@ static int tls_decrypt_ticket(SSL *s, co
+ HMAC_CTX hctx;
+ EVP_CIPHER_CTX ctx;
+ SSL_CTX *tctx = s->initial_ctx;
+- /* Need at least keyname + iv + some encrypted data */
+- if (eticklen < 48)
+- return 2;
++
+ /* Initialize session ticket encryption and HMAC contexts */
+ HMAC_CTX_init(&hctx);
+ EVP_CIPHER_CTX_init(&ctx);
+@@ -3433,6 +3431,13 @@ static int tls_decrypt_ticket(SSL *s, co
+ if (mlen < 0) {
+ goto err;
+ }
++ /* Sanity check ticket length: must exceed keyname + IV + HMAC */
++ if (eticklen <= 16 + EVP_CIPHER_CTX_iv_length(&ctx) + mlen) {
++ HMAC_CTX_cleanup(&hctx);
++ EVP_CIPHER_CTX_cleanup(&ctx);
++ return 2;
++ }
++
+ eticklen -= mlen;
+ /* Check HMAC of encrypted ticket */
+ if (HMAC_Update(&hctx, etick, eticklen) <= 0
diff --git a/meta/recipes-connectivity/openssl/openssl_1.0.2h.bb b/meta/recipes-connectivity/openssl/openssl_1.0.2h.bb
index da40a9b48d..c1bced0043 100644
--- a/meta/recipes-connectivity/openssl/openssl_1.0.2h.bb
+++ b/meta/recipes-connectivity/openssl/openssl_1.0.2h.bb
@@ -45,6 +45,7 @@ SRC_URI += "file://configure-targets.patch \
file://CVE-2016-2181_p2.patch \
file://CVE-2016-2181_p3.patch \
file://CVE-2016-2182.patch \
+ file://CVE-2016-6302.patch \
"
SRC_URI[md5sum] = "9392e65072ce4b614c1392eefc1f23d0"