diff options
| author | Armin Kuster <akuster@mvista.com> | 2016-09-23 23:13:04 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-10-06 08:51:17 +0100 |
| commit | 91353b6936666bcdde5ef022760f5ed8aebe7ef5 (patch) | |
| tree | d69f127f7fbee5ad5fe189329b3fc0e1430ae81d /meta | |
| parent | 942832888bce5f97e6423d05806777c1d7153c87 (diff) | |
| download | poky-91353b6936666bcdde5ef022760f5ed8aebe7ef5.tar.gz | |
openssl: Security fix CVE-2016-6302
affects openssl < 1.0.1i
(From OE-Core rev: 963c69e1e8e9cefccccb59619cb07ee31f07ffa1)
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-connectivity/openssl/openssl/CVE-2016-6302.patch | 53 | ||||
| -rw-r--r-- | meta/recipes-connectivity/openssl/openssl_1.0.2h.bb | 1 |
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 @@ | |||
| 1 | From baaabfd8fdcec04a691695fad9a664bea43202b6 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "Dr. Stephen Henson" <steve@openssl.org> | ||
| 3 | Date: Tue, 23 Aug 2016 18:14:54 +0100 | ||
| 4 | Subject: [PATCH] Sanity check ticket length. | ||
| 5 | |||
| 6 | If a ticket callback changes the HMAC digest to SHA512 the existing | ||
| 7 | sanity checks are not sufficient and an attacker could perform a DoS | ||
| 8 | attack with a malformed ticket. Add additional checks based on | ||
| 9 | HMAC size. | ||
| 10 | |||
| 11 | Thanks to Shi Lei for reporting this bug. | ||
| 12 | |||
| 13 | CVE-2016-6302 | ||
| 14 | |||
| 15 | Reviewed-by: Rich Salz <rsalz@openssl.org> | ||
| 16 | |||
| 17 | Upstream-Status: Backport | ||
| 18 | CVE: CVE-2016-6302 | ||
| 19 | Signed-off-by: Armin Kuster <akuster@mvista.com> | ||
| 20 | |||
| 21 | --- | ||
| 22 | ssl/t1_lib.c | 11 ++++++++--- | ||
| 23 | 1 file changed, 8 insertions(+), 3 deletions(-) | ||
| 24 | |||
| 25 | Index: openssl-1.0.2h/ssl/t1_lib.c | ||
| 26 | =================================================================== | ||
| 27 | --- openssl-1.0.2h.orig/ssl/t1_lib.c | ||
| 28 | +++ openssl-1.0.2h/ssl/t1_lib.c | ||
| 29 | @@ -3397,9 +3397,7 @@ static int tls_decrypt_ticket(SSL *s, co | ||
| 30 | HMAC_CTX hctx; | ||
| 31 | EVP_CIPHER_CTX ctx; | ||
| 32 | SSL_CTX *tctx = s->initial_ctx; | ||
| 33 | - /* Need at least keyname + iv + some encrypted data */ | ||
| 34 | - if (eticklen < 48) | ||
| 35 | - return 2; | ||
| 36 | + | ||
| 37 | /* Initialize session ticket encryption and HMAC contexts */ | ||
| 38 | HMAC_CTX_init(&hctx); | ||
| 39 | EVP_CIPHER_CTX_init(&ctx); | ||
| 40 | @@ -3433,6 +3431,13 @@ static int tls_decrypt_ticket(SSL *s, co | ||
| 41 | if (mlen < 0) { | ||
| 42 | goto err; | ||
| 43 | } | ||
| 44 | + /* Sanity check ticket length: must exceed keyname + IV + HMAC */ | ||
| 45 | + if (eticklen <= 16 + EVP_CIPHER_CTX_iv_length(&ctx) + mlen) { | ||
| 46 | + HMAC_CTX_cleanup(&hctx); | ||
| 47 | + EVP_CIPHER_CTX_cleanup(&ctx); | ||
| 48 | + return 2; | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | eticklen -= mlen; | ||
| 52 | /* Check HMAC of encrypted ticket */ | ||
| 53 | 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 \ | |||
| 45 | file://CVE-2016-2181_p2.patch \ | 45 | file://CVE-2016-2181_p2.patch \ |
| 46 | file://CVE-2016-2181_p3.patch \ | 46 | file://CVE-2016-2181_p3.patch \ |
| 47 | file://CVE-2016-2182.patch \ | 47 | file://CVE-2016-2182.patch \ |
| 48 | file://CVE-2016-6302.patch \ | ||
| 48 | " | 49 | " |
| 49 | 50 | ||
| 50 | SRC_URI[md5sum] = "9392e65072ce4b614c1392eefc1f23d0" | 51 | SRC_URI[md5sum] = "9392e65072ce4b614c1392eefc1f23d0" |
