curl: security fix for CVE-2016-5419
PATCH 1/3 curl: security fix for CVE-2016-5419
Affected versions: libcurl 7.1 to and including 7.50.0
Signed-off-by Maxin B. John <[email protected]>
--- meta/recipes-support/curl/curl/CVE-2016-5419.patch | 76 ++++++++++++++++++++++ meta/recipes-support/curl/curl_7.47.1.bb | 4 +- 2 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-support/curl/curl/CVE-2016-5419.patch
meta/recipes-support/curl/curl/CVE-2016-5419.patch new file +76 -0
@@ -0,0 +1,76 @@ +From 247d890da88f9ee817079e246c59f3d7d12fde5f Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg <[email protected]> +Date: Fri, 1 Jul 2016 13:32:31 +0200 +Subject: [PATCH] TLS: switch off SSL session id when client cert is used + + +Bug: https://curl.haxx.se/docs/adv_20160803A.html +Reported-by: Bru Rom +Contributions-by: Eric Rescorla and Ray Satiro + +Upstream-Status: Backport +https://curl.haxx.se/CVE-2016-5419.patch + +CVE: CVE-2016-5419 +Signed-off-by: Maxin B. John <[email protected]> +--- + lib/url.c | 1 + + lib/urldata.h | 1 + + lib/vtls/vtls.c | 10 ++++++++++ + 3 files changed, 12 insertions(+) + +diff --git a/lib/url.c b/lib/url.c +index 258a286..e547e5c 100644 +--- a/lib/url.c ++++ b/lib/url.c +@@ -6123,6 +6123,7 @@ static CURLcode create_conn(struct Curl_easy *data, + data->set.ssl.random_file = data->set.str[STRING_SSL_RANDOM_FILE]; + data->set.ssl.egdsocket = data->set.str[STRING_SSL_EGDSOCKET]; + data->set.ssl.cipher_list = data->set.str[STRING_SSL_CIPHER_LIST]; ++ data->set.ssl.clientcert = data->set.str[STRING_CERT]; + #ifdef USE_TLS_SRP + data->set.ssl.username = data->set.str[STRING_TLSAUTH_USERNAME]; + data->set.ssl.password = data->set.str[STRING_TLSAUTH_PASSWORD]; +diff --git a/lib/urldata.h b/lib/urldata.h +index 611c5a7..3cf7ed9 100644 +--- a/lib/urldata.h ++++ b/lib/urldata.h +@@ -351,6 +351,7 @@ struct ssl_config_data { + char *CAfile; /* certificate to verify peer against */ + const char *CRLfile; /* CRL to check certificate revocation */ + const char *issuercert;/* optional issuer certificate filename */ ++ char *clientcert; + char *random_file; /* path to file containing "random" data */ + char *egdsocket; /* path to file containing the EGD daemon socket */ + char *cipher_list; /* list of ciphers to use */ +diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c +index d3e41cd..33e209d 100644 +--- a/lib/vtls/vtls.c ++++ b/lib/vtls/vtls.c +@@ -156,6 +156,15 @@ Curl_clone_ssl_config(struct ssl_config_data *source, + else + dest->random_file = NULL; + ++ if(source->clientcert) { ++ dest->clientcert = strdup(source->clientcert); ++ if(!dest->clientcert) ++ return FALSE; ++ dest->sessionid = FALSE; ++ } ++ else ++ dest->clientcert = NULL; ++ + return TRUE; + } + +@@ -166,6 +175,7 @@ void Curl_free_ssl_config(struct ssl_config_data* sslc) + Curl_safefree(sslc->cipher_list); + Curl_safefree(sslc->egdsocket); + Curl_safefree(sslc->random_file); ++ Curl_safefree(sslc->clientcert); + } + + +-- +2.4.0 +
meta/recipes-support/curl/curl_7.47.1.bb +3 -1
@@ -10,7 +10,9 @@ SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2" # curl likes to set -g0 in CFLAGS, so we stop it # from mucking around with debug options # -SRC_URI += " file://configure_ac.patch" +SRC_URI += " file://configure_ac.patch \ + file://CVE-2016-5419.patch \ + " SRC_URI[md5sum] = "9ea3123449439bbd960cd25cf98796fb" SRC_URI[sha256sum] = "ddc643ab9382e24bbe4747d43df189a0a6ce38fcb33df041b9cb0b3cd47ae98f"
Signature · 1 line
2.4.0
PATCH 3/3 curl: security fix for CVE-2016-5421
Affected versions: libcurl 7.32.0 to and including 7.50.0
Signed-off-by Maxin B. John <[email protected]>
--- meta/recipes-support/curl/curl/CVE-2016-5421.patch | 36 ++++++++++++++++++++++ meta/recipes-support/curl/curl_7.47.1.bb | 1 + 2 files changed, 37 insertions(+) create mode 100644 meta/recipes-support/curl/curl/CVE-2016-5421.patch
meta/recipes-support/curl/curl/CVE-2016-5421.patch new file +36 -0
@@ -0,0 +1,36 @@ +From 75dc096e01ef1e21b6c57690d99371dedb2c0b80 Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg <[email protected]> +Date: Sun, 31 Jul 2016 01:09:04 +0200 +Subject: [PATCH] curl_multi_cleanup: clear connection pointer for easy handles +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Bug: https://curl.haxx.se/docs/adv_20160803C.html +Reported-by: Marcelo Echeverria and Fernando Muñoz + +Upstream-Status: Backport +https://curl.haxx.se/CVE-2016-5421.patch + +CVE: CVE-2016-5421 +Signed-off-by: Maxin B. John <[email protected]> +--- + lib/multi.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/lib/multi.c b/lib/multi.c +index 9ee3523..8bb9366 100644 +--- a/lib/multi.c ++++ b/lib/multi.c +@@ -2157,6 +2157,8 @@ static void close_all_connections(struct Curl_multi *multi) + conn->data = multi->closure_handle; + + sigpipe_ignore(conn->data, &pipe_st); ++ conn->data->easy_conn = NULL; /* clear the easy handle's connection ++ pointer */ + /* This will remove the connection from the cache */ + (void)Curl_disconnect(conn, FALSE); + sigpipe_restore(&pipe_st); +-- +2.4.0 +
meta/recipes-support/curl/curl_7.47.1.bb +1 -0
@@ -13,6 +13,7 @@ SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2" SRC_URI += " file://configure_ac.patch \ file://CVE-2016-5419.patch \ file://CVE-2016-5420.patch \ + file://CVE-2016-5421.patch \ " SRC_URI[md5sum] = "9ea3123449439bbd960cd25cf98796fb"
Signature · 1 line
2.4.0
PATCH 2/3 curl: security fix for CVE-2016-5420
In reply to Maxin B. JohnAffected versions: libcurl 7.1 to and including 7.50.0
Signed-off-by Maxin B. John <[email protected]>
--- meta/recipes-support/curl/curl/CVE-2016-5420.patch | 31 ++++++++++++++++++++++ meta/recipes-support/curl/curl_7.47.1.bb | 1 + 2 files changed, 32 insertions(+) create mode 100644 meta/recipes-support/curl/curl/CVE-2016-5420.patch
meta/recipes-support/curl/curl/CVE-2016-5420.patch new file +31 -0
@@ -0,0 +1,31 @@ +From 11ec5ad4352bba384404c56e77c7fab9382fd22d Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg <[email protected]> +Date: Sun, 31 Jul 2016 00:51:48 +0200 +Subject: [PATCH] TLS: only reuse connections with the same client cert + +Bug: https://curl.haxx.se/docs/adv_20160803B.html + +Upstream-Status: Backport +https://curl.haxx.se/CVE-2016-5420.patch + +CVE: CVE-2016-5420 +Signed-off-by: Maxin B. John <[email protected]> +--- + lib/vtls/vtls.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c +index 33e209d..3863777 100644 +--- a/lib/vtls/vtls.c ++++ b/lib/vtls/vtls.c +@@ -99,6 +99,7 @@ Curl_ssl_config_matches(struct ssl_config_data* data, + (data->verifyhost == needle->verifyhost) && + safe_strequal(data->CApath, needle->CApath) && + safe_strequal(data->CAfile, needle->CAfile) && ++ safe_strequal(data->clientcert, needle->clientcert) && + safe_strequal(data->random_file, needle->random_file) && + safe_strequal(data->egdsocket, needle->egdsocket) && + safe_strequal(data->cipher_list, needle->cipher_list)) +-- +2.4.0 +
meta/recipes-support/curl/curl_7.47.1.bb +1 -0
@@ -12,6 +12,7 @@ SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2" # SRC_URI += " file://configure_ac.patch \ file://CVE-2016-5419.patch \ + file://CVE-2016-5420.patch \ " SRC_URI[md5sum] = "9ea3123449439bbd960cd25cf98796fb"
Signature · 1 line
2.4.0