summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/curl/curl/CVE-2016-8622.patch
diff options
context:
space:
mode:
authorSona Sarmadi <sona.sarmadi@enea.com>2017-04-21 12:29:17 +0200
committerAdrian Dudau <adrian.dudau@enea.com>2017-04-21 13:54:14 +0200
commit3fc5d271f554e07c88b1195812e48a0d86291395 (patch)
treeaa886d608aee07639e7a841d0618ccd0bda97bc7 /meta/recipes-support/curl/curl/CVE-2016-8622.patch
parent9ee38b3a027470c98f7337dceac67ba06420c075 (diff)
downloadpoky-3fc5d271f554e07c88b1195812e48a0d86291395.tar.gz
curl: Upgrade 7.47.1 -> 7.53.1
Security vulnerabilities fixed between 7.47.1 and 7.53.1 versions: ================================================================= TLS session resumption client cert bypass (again): CVE-2017-XXXX --write-out out of buffer read: CVE-2017-7407 SSL_VERIFYSTATUS ignored: CVE-2017-2629 uninitialized random: CVE-2016-9594 printf floating point buffer overflow: CVE-2016-9586 Win CE schannel cert wildcard matches too much: CVE-2016-9952 Win CE schannel cert name out of buffer read: CVE-2016-9953 cookie injection for other servers: CVE-2016-8615 case insensitive password comparison: CVE-2016-8616 OOB write via unchecked multiplication: CVE-2016-8617 double-free in curl_maprintf: CVE-2016-8618 double-free in krb5 code: CVE-2016-8619 glob parser write/read out of bounds: CVE-2016-8620 curl_getdate read out of bounds: CVE-2016-8621 URL unescape heap overflow via integer truncation: CVE-2016-8622 Use-after-free via shared cookies: CVE-2016-8623 invalid URL parsing with '#': CVE-2016-8624 IDNA 2003 makes curl use wrong host: CVE-2016-8625 curl escape and unescape integer overflows: CVE-2016-7167 Incorrect reuse of client certificates: CVE-2016-7141 TLS session resumption client cert bypass: CVE-2016-5419 Re-using connections with wrong client cert: CVE-2016-5420 use of connection struct after free: CVE-2016-5421 Windows DLL hijacking: CVE-2016-4802 TLS certificate check bypass with mbedTLS/PolarSSL: CVE-2016-3739 Reference: https://curl.haxx.se/docs/security.html https://curl.haxx.se/changes.html Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com> Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-support/curl/curl/CVE-2016-8622.patch')
-rw-r--r--meta/recipes-support/curl/curl/CVE-2016-8622.patch94
1 files changed, 0 insertions, 94 deletions
diff --git a/meta/recipes-support/curl/curl/CVE-2016-8622.patch b/meta/recipes-support/curl/curl/CVE-2016-8622.patch
deleted file mode 100644
index 8edad0184e..0000000000
--- a/meta/recipes-support/curl/curl/CVE-2016-8622.patch
+++ /dev/null
@@ -1,94 +0,0 @@
1From 53e71e47d6b81650d26ec33a58d0dca24c7ffb2c Mon Sep 17 00:00:00 2001
2From: Daniel Stenberg <daniel@haxx.se>
3Date: Tue, 4 Oct 2016 18:56:45 +0200
4Subject: [PATCH] unescape: avoid integer overflow
5
6CVE: CVE-2016-8622
7Upstream-Status: Backport
8
9Bug: https://curl.haxx.se/docs/adv_20161102H.html
10Reported-by: Cure53
11
12Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
13
14diff -ruN a/docs/libcurl/curl_easy_unescape.3 b/docs/libcurl/curl_easy_unescape.3
15--- a/docs/libcurl/curl_easy_unescape.3 2016-02-03 00:08:02.000000000 +0100
16+++ b/docs/libcurl/curl_easy_unescape.3 2016-11-07 09:25:45.999933275 +0100
17@@ -5,7 +5,7 @@
18 .\" * | (__| |_| | _ <| |___
19 .\" * \___|\___/|_| \_\_____|
20 .\" *
21-.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
22+.\" * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
23 .\" *
24 .\" * This software is licensed as described in the file COPYING, which
25 .\" * you should have received as part of this distribution. The terms
26@@ -40,7 +40,10 @@
27
28 If \fBoutlength\fP is non-NULL, the function will write the length of the
29 returned string in the integer it points to. This allows an escaped string
30-containing %00 to still get used properly after unescaping.
31+containing %00 to still get used properly after unescaping. Since this is a
32+pointer to an \fIint\fP type, it can only return a value up to INT_MAX so no
33+longer string can be unescaped if the string length is returned in this
34+parameter.
35
36 You must \fIcurl_free(3)\fP the returned string when you're done with it.
37 .SH AVAILABILITY
38diff -ruN a/lib/dict.c b/lib/dict.c
39--- a/lib/dict.c 2016-02-03 00:02:44.000000000 +0100
40+++ b/lib/dict.c 2016-11-07 09:25:45.999933275 +0100
41@@ -5,7 +5,7 @@
42 * | (__| |_| | _ <| |___
43 * \___|\___/|_| \_\_____|
44 *
45- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
46+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
47 *
48 * This software is licensed as described in the file COPYING, which
49 * you should have received as part of this distribution. The terms
50@@ -52,7 +52,7 @@
51 #include <curl/curl.h>
52 #include "transfer.h"
53 #include "sendf.h"
54-
55+#include "escape.h"
56 #include "progress.h"
57 #include "strequal.h"
58 #include "dict.h"
59@@ -96,12 +96,12 @@
60 char *newp;
61 char *dictp;
62 char *ptr;
63- int len;
64+ size_t len;
65 char ch;
66 int olen=0;
67
68- newp = curl_easy_unescape(data, inputbuff, 0, &len);
69- if(!newp)
70+ CURLcode result = Curl_urldecode(data, inputbuff, 0, &newp, &len, FALSE);
71+ if(!newp || result)
72 return NULL;
73
74 dictp = malloc(((size_t)len)*2 + 1); /* add one for terminating zero */
75diff -ruN a/lib/escape.c b/lib/escape.c
76--- a/lib/escape.c 2016-02-05 10:02:03.000000000 +0100
77+++ b/lib/escape.c 2016-11-07 09:29:43.073671606 +0100
78@@ -217,8 +217,14 @@
79 FALSE);
80 if(res)
81 return NULL;
82- if(olen)
83- *olen = curlx_uztosi(outputlen);
84+
85+ if(olen) {
86+ if(outputlen <= (size_t) INT_MAX)
87+ *olen = curlx_uztosi(outputlen);
88+ else
89+ /* too large to return in an int, fail! */
90+ Curl_safefree(str);
91+ }
92 return str;
93 }
94