diff options
| author | Maxin B. John <maxin.john@intel.com> | 2016-08-22 11:39:31 +0300 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-02 08:48:34 +0100 |
| commit | 0e0c04343d1fd6bb8a05ede4c33f2636921a0ec3 (patch) | |
| tree | fb22a5c39a4ccc48510b2b0155420b999b3e05f8 | |
| parent | 40376446904ae3529be41737fed9a0b650ed167d (diff) | |
| download | poky-0e0c04343d1fd6bb8a05ede4c33f2636921a0ec3.tar.gz | |
curl: security fix for CVE-2016-5419
Affected versions: libcurl 7.1 to and including 7.50.0
(From OE-Core rev: d1d6c93b491056b18b528216303047e353956e34)
Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-support/curl/curl/CVE-2016-5419.patch | 76 | ||||
| -rw-r--r-- | meta/recipes-support/curl/curl_7.44.0.bb | 1 |
2 files changed, 77 insertions, 0 deletions
diff --git a/meta/recipes-support/curl/curl/CVE-2016-5419.patch b/meta/recipes-support/curl/curl/CVE-2016-5419.patch new file mode 100644 index 0000000000..2bea362c87 --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2016-5419.patch | |||
| @@ -0,0 +1,76 @@ | |||
| 1 | From 247d890da88f9ee817079e246c59f3d7d12fde5f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Daniel Stenberg <daniel@haxx.se> | ||
| 3 | Date: Fri, 1 Jul 2016 13:32:31 +0200 | ||
| 4 | Subject: [PATCH] TLS: switch off SSL session id when client cert is used | ||
| 5 | |||
| 6 | |||
| 7 | Bug: https://curl.haxx.se/docs/adv_20160803A.html | ||
| 8 | Reported-by: Bru Rom | ||
| 9 | Contributions-by: Eric Rescorla and Ray Satiro | ||
| 10 | |||
| 11 | Upstream-Status: Backport | ||
| 12 | https://curl.haxx.se/CVE-2016-5419.patch | ||
| 13 | |||
| 14 | CVE: CVE-2016-5419 | ||
| 15 | Signed-off-by: Maxin B. John <maxin.john@intel.com> | ||
| 16 | --- | ||
| 17 | lib/url.c | 1 + | ||
| 18 | lib/urldata.h | 1 + | ||
| 19 | lib/vtls/vtls.c | 10 ++++++++++ | ||
| 20 | 3 files changed, 12 insertions(+) | ||
| 21 | |||
| 22 | diff --git a/lib/url.c b/lib/url.c | ||
| 23 | index 258a286..e547e5c 100644 | ||
| 24 | --- a/lib/url.c | ||
| 25 | +++ b/lib/url.c | ||
| 26 | @@ -6123,6 +6123,7 @@ static CURLcode create_conn(struct Curl_easy *data, | ||
| 27 | data->set.ssl.random_file = data->set.str[STRING_SSL_RANDOM_FILE]; | ||
| 28 | data->set.ssl.egdsocket = data->set.str[STRING_SSL_EGDSOCKET]; | ||
| 29 | data->set.ssl.cipher_list = data->set.str[STRING_SSL_CIPHER_LIST]; | ||
| 30 | + data->set.ssl.clientcert = data->set.str[STRING_CERT]; | ||
| 31 | #ifdef USE_TLS_SRP | ||
| 32 | data->set.ssl.username = data->set.str[STRING_TLSAUTH_USERNAME]; | ||
| 33 | data->set.ssl.password = data->set.str[STRING_TLSAUTH_PASSWORD]; | ||
| 34 | diff --git a/lib/urldata.h b/lib/urldata.h | ||
| 35 | index 611c5a7..3cf7ed9 100644 | ||
| 36 | --- a/lib/urldata.h | ||
| 37 | +++ b/lib/urldata.h | ||
| 38 | @@ -351,6 +351,7 @@ struct ssl_config_data { | ||
| 39 | char *CAfile; /* certificate to verify peer against */ | ||
| 40 | const char *CRLfile; /* CRL to check certificate revocation */ | ||
| 41 | const char *issuercert;/* optional issuer certificate filename */ | ||
| 42 | + char *clientcert; | ||
| 43 | char *random_file; /* path to file containing "random" data */ | ||
| 44 | char *egdsocket; /* path to file containing the EGD daemon socket */ | ||
| 45 | char *cipher_list; /* list of ciphers to use */ | ||
| 46 | diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c | ||
| 47 | index d3e41cd..33e209d 100644 | ||
| 48 | --- a/lib/vtls/vtls.c | ||
| 49 | +++ b/lib/vtls/vtls.c | ||
| 50 | @@ -156,6 +156,15 @@ Curl_clone_ssl_config(struct ssl_config_data *source, | ||
| 51 | else | ||
| 52 | dest->random_file = NULL; | ||
| 53 | |||
| 54 | + if(source->clientcert) { | ||
| 55 | + dest->clientcert = strdup(source->clientcert); | ||
| 56 | + if(!dest->clientcert) | ||
| 57 | + return FALSE; | ||
| 58 | + dest->sessionid = FALSE; | ||
| 59 | + } | ||
| 60 | + else | ||
| 61 | + dest->clientcert = NULL; | ||
| 62 | + | ||
| 63 | return TRUE; | ||
| 64 | } | ||
| 65 | |||
| 66 | @@ -166,6 +175,7 @@ void Curl_free_ssl_config(struct ssl_config_data* sslc) | ||
| 67 | Curl_safefree(sslc->cipher_list); | ||
| 68 | Curl_safefree(sslc->egdsocket); | ||
| 69 | Curl_safefree(sslc->random_file); | ||
| 70 | + Curl_safefree(sslc->clientcert); | ||
| 71 | } | ||
| 72 | |||
| 73 | |||
| 74 | -- | ||
| 75 | 2.4.0 | ||
| 76 | |||
diff --git a/meta/recipes-support/curl/curl_7.44.0.bb b/meta/recipes-support/curl/curl_7.44.0.bb index 419ed8365e..dcd63aa938 100644 --- a/meta/recipes-support/curl/curl_7.44.0.bb +++ b/meta/recipes-support/curl/curl_7.44.0.bb | |||
| @@ -13,6 +13,7 @@ SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \ | |||
| 13 | # from mucking around with debug options | 13 | # from mucking around with debug options |
| 14 | # | 14 | # |
| 15 | SRC_URI += " file://configure_ac.patch \ | 15 | SRC_URI += " file://configure_ac.patch \ |
| 16 | file://CVE-2016-5419.patch \ | ||
| 16 | file://CVE-2016-0754.patch \ | 17 | file://CVE-2016-0754.patch \ |
| 17 | file://CVE-2016-0755.patch" | 18 | file://CVE-2016-0755.patch" |
| 18 | 19 | ||
