diff options
| author | Sona Sarmadi <sona.sarmadi@enea.com> | 2016-09-08 15:33:50 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-23 15:27:04 +0100 |
| commit | 6175bd0930e726a81facc394b39956b1aa58e674 (patch) | |
| tree | 1dc576a431a39785eaffc8f2fa1465c9f2cb390c | |
| parent | 016df260e531c4e8209b3b3a79697c2055f8e0ce (diff) | |
| download | poky-6175bd0930e726a81facc394b39956b1aa58e674.tar.gz | |
curl: security fix for CVE-2016-7141
Affected versions:
Affected versions: libcurl 7.19.6 to and including 7.50.1
Not affected versions: libcurl >= 7.50.2
Reference to upstream patch:
https://curl.haxx.se/CVE-2016-7141.patch
(From OE-Core rev: fb8f291d9ea2ebc011403f72cb91af372a795091)
Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-support/curl/curl/CVE-2016-7141.patch | 50 | ||||
| -rw-r--r-- | meta/recipes-support/curl/curl_7.47.1.bb | 1 |
2 files changed, 51 insertions, 0 deletions
diff --git a/meta/recipes-support/curl/curl/CVE-2016-7141.patch b/meta/recipes-support/curl/curl/CVE-2016-7141.patch new file mode 100644 index 0000000000..eb03afddf8 --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2016-7141.patch | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | From 7700fcba64bf5806de28f6c1c7da3b4f0b38567d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Kamil Dudka <kdudka@redhat.com> | ||
| 3 | Date: Mon, 22 Aug 2016 10:24:35 +0200 | ||
| 4 | Subject: [PATCH] nss: refuse previously loaded certificate from file | ||
| 5 | |||
| 6 | ... when we are not asked to use a certificate from file | ||
| 7 | |||
| 8 | Bug: https://curl.haxx.se/docs/adv_20160907.html | ||
| 9 | Reported-by: kdudka@redhat.com | ||
| 10 | |||
| 11 | Upstream-Status: Backport | ||
| 12 | https://curl.haxx.se/CVE-2016-5421.patch | ||
| 13 | |||
| 14 | CVE: CVE-2016-7141 | ||
| 15 | Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com> | ||
| 16 | --- | ||
| 17 | lib/vtls/nss.c | 8 +++++++- | ||
| 18 | 1 file changed, 7 insertions(+), 1 deletion(-) | ||
| 19 | |||
| 20 | diff --git a/lib/vtls/nss.c b/lib/vtls/nss.c | ||
| 21 | index 20c4277..cfb2263 100644 | ||
| 22 | --- a/lib/vtls/nss.c | ||
| 23 | +++ b/lib/vtls/nss.c | ||
| 24 | @@ -1002,10 +1002,10 @@ static SECStatus SelectClientCert(void *arg, PRFileDesc *sock, | ||
| 25 | struct ssl_connect_data *connssl = (struct ssl_connect_data *)arg; | ||
| 26 | struct Curl_easy *data = connssl->data; | ||
| 27 | const char *nickname = connssl->client_nickname; | ||
| 28 | + static const char pem_slotname[] = "PEM Token #1"; | ||
| 29 | |||
| 30 | if(connssl->obj_clicert) { | ||
| 31 | /* use the cert/key provided by PEM reader */ | ||
| 32 | - static const char pem_slotname[] = "PEM Token #1"; | ||
| 33 | SECItem cert_der = { 0, NULL, 0 }; | ||
| 34 | void *proto_win = SSL_RevealPinArg(sock); | ||
| 35 | struct CERTCertificateStr *cert; | ||
| 36 | @@ -1067,6 +1067,12 @@ static SECStatus SelectClientCert(void *arg, PRFileDesc *sock, | ||
| 37 | if(NULL == nickname) | ||
| 38 | nickname = "[unknown]"; | ||
| 39 | |||
| 40 | + if(!strncmp(nickname, pem_slotname, sizeof(pem_slotname) - 1U)) { | ||
| 41 | + failf(data, "NSS: refusing previously loaded certificate from file: %s", | ||
| 42 | + nickname); | ||
| 43 | + return SECFailure; | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | if(NULL == *pRetKey) { | ||
| 47 | failf(data, "NSS: private key not found for certificate: %s", nickname); | ||
| 48 | return SECFailure; | ||
| 49 | -- | ||
| 50 | 2.7.4 | ||
diff --git a/meta/recipes-support/curl/curl_7.47.1.bb b/meta/recipes-support/curl/curl_7.47.1.bb index 6c71760e49..3670a11178 100644 --- a/meta/recipes-support/curl/curl_7.47.1.bb +++ b/meta/recipes-support/curl/curl_7.47.1.bb | |||
| @@ -14,6 +14,7 @@ SRC_URI += " file://configure_ac.patch \ | |||
| 14 | file://CVE-2016-5419.patch \ | 14 | file://CVE-2016-5419.patch \ |
| 15 | file://CVE-2016-5420.patch \ | 15 | file://CVE-2016-5420.patch \ |
| 16 | file://CVE-2016-5421.patch \ | 16 | file://CVE-2016-5421.patch \ |
| 17 | file://CVE-2016-7141.patch \ | ||
| 17 | " | 18 | " |
| 18 | 19 | ||
| 19 | SRC_URI[md5sum] = "9ea3123449439bbd960cd25cf98796fb" | 20 | SRC_URI[md5sum] = "9ea3123449439bbd960cd25cf98796fb" |
