summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/curl
diff options
context:
space:
mode:
authorHuang Qiyu <huangqy.fnst@cn.fujitsu.com>2018-01-24 11:01:36 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-26 13:09:10 +0000
commit4e3afac076b816893cdd18d7cf55fff7c32dee85 (patch)
tree05597ac06e365830f74b760d4c71196a58798918 /meta/recipes-support/curl
parent13612e26db56d7d2fe35661910fe4b0a4e66bc27 (diff)
downloadpoky-4e3afac076b816893cdd18d7cf55fff7c32dee85.tar.gz
curl: 7.54.1 -> 7.57.0
1.Upgrade curl from 7.54.1 to 7.57.0. 2.Delete CVE-2017-1000099.patch, CVE-2017-1000100.patch, CVE-2017-1000101.patch, CVE-2017-1000254.patch, reproducible-mkhelp.patch, since it is integrated upstream. 3.Remove "do_install_append()" from curl_7.57.0.bb, since curl/curlbuild.h has been removed. (From OE-Core rev: 215d5677004537fc190b5381157ac8b94db6d7e8) Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/curl')
-rw-r--r--meta/recipes-support/curl/curl/CVE-2017-1000099.patch41
-rw-r--r--meta/recipes-support/curl/curl/CVE-2017-1000100.patch51
-rw-r--r--meta/recipes-support/curl/curl/CVE-2017-1000101.patch99
-rw-r--r--meta/recipes-support/curl/curl/CVE-2017-1000254.patch138
-rw-r--r--meta/recipes-support/curl/curl/reproducible-mkhelp.patch32
-rw-r--r--meta/recipes-support/curl/curl_7.57.0.bb (renamed from meta/recipes-support/curl/curl_7.54.1.bb)14
6 files changed, 2 insertions, 373 deletions
diff --git a/meta/recipes-support/curl/curl/CVE-2017-1000099.patch b/meta/recipes-support/curl/curl/CVE-2017-1000099.patch
deleted file mode 100644
index 96ff1b064b..0000000000
--- a/meta/recipes-support/curl/curl/CVE-2017-1000099.patch
+++ /dev/null
@@ -1,41 +0,0 @@
1From c9332fa5e84f24da300b42b1a931ade929d3e27d Mon Sep 17 00:00:00 2001
2From: Even Rouault <even.rouault@spatialys.com>
3Date: Tue, 1 Aug 2017 17:17:06 +0200
4Subject: [PATCH] file: output the correct buffer to the user
5
6Regression brought by 7c312f84ea930d8 (April 2017)
7
8CVE: CVE-2017-1000099
9
10Bug: https://curl.haxx.se/docs/adv_20170809C.html
11
12Credit to OSS-Fuzz for the discovery
13
14Upstream-Status: Backport
15https://github.com/curl/curl/commit/c9332fa5e84f24da300b42b1a931ade929d3e27d
16
17Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
18---
19 lib/file.c | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22diff --git a/lib/file.c b/lib/file.c
23index bd426eac2..666cbe75b 100644
24--- a/lib/file.c
25+++ b/lib/file.c
26@@ -499,11 +499,11 @@ static CURLcode file_do(struct connectdata *conn, bool *done)
27 Curl_month[tm->tm_mon],
28 tm->tm_year + 1900,
29 tm->tm_hour,
30 tm->tm_min,
31 tm->tm_sec);
32- result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0);
33+ result = Curl_client_write(conn, CLIENTWRITE_BOTH, header, 0);
34 if(!result)
35 /* set the file size to make it available post transfer */
36 Curl_pgrsSetDownloadSize(data, expected_size);
37 return result;
38 }
39--
402.13.3
41
diff --git a/meta/recipes-support/curl/curl/CVE-2017-1000100.patch b/meta/recipes-support/curl/curl/CVE-2017-1000100.patch
deleted file mode 100644
index f74f1dd896..0000000000
--- a/meta/recipes-support/curl/curl/CVE-2017-1000100.patch
+++ /dev/null
@@ -1,51 +0,0 @@
1From 358b2b131ad6c095696f20dcfa62b8305263f898 Mon Sep 17 00:00:00 2001
2From: Daniel Stenberg <daniel@haxx.se>
3Date: Tue, 1 Aug 2017 17:16:46 +0200
4Subject: [PATCH] tftp: reject file name lengths that don't fit
5
6... and thereby avoid telling send() to send off more bytes than the
7size of the buffer!
8
9CVE: CVE-2017-1000100
10
11Bug: https://curl.haxx.se/docs/adv_20170809B.html
12Reported-by: Even Rouault
13
14Credit to OSS-Fuzz for the discovery
15
16Upstream-Status: Backport
17https://github.com/curl/curl/commit/358b2b131ad6c095696f20dcfa62b8305263f898
18
19Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
20---
21 lib/tftp.c | 7 ++++++-
22 1 file changed, 6 insertions(+), 1 deletion(-)
23
24diff --git a/lib/tftp.c b/lib/tftp.c
25index 02bd842..f6f4bce 100644
26--- a/lib/tftp.c
27+++ b/lib/tftp.c
28@@ -5,7 +5,7 @@
29 * | (__| |_| | _ <| |___
30 * \___|\___/|_| \_\_____|
31 *
32- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
33+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
34 *
35 * This software is licensed as described in the file COPYING, which
36 * you should have received as part of this distribution. The terms
37@@ -491,6 +491,11 @@ static CURLcode tftp_send_first(tftp_state_data_t *state, tftp_event_t event)
38 if(result)
39 return result;
40
41+ if(strlen(filename) > (state->blksize - strlen(mode) - 4)) {
42+ failf(data, "TFTP file name too long\n");
43+ return CURLE_TFTP_ILLEGAL; /* too long file name field */
44+ }
45+
46 snprintf((char *)state->spacket.data+2,
47 state->blksize,
48 "%s%c%s%c", filename, '\0', mode, '\0');
49--
501.7.9.5
51
diff --git a/meta/recipes-support/curl/curl/CVE-2017-1000101.patch b/meta/recipes-support/curl/curl/CVE-2017-1000101.patch
deleted file mode 100644
index c300fff00c..0000000000
--- a/meta/recipes-support/curl/curl/CVE-2017-1000101.patch
+++ /dev/null
@@ -1,99 +0,0 @@
1From 453e7a7a03a2cec749abd3878a48e728c515cca7 Mon Sep 17 00:00:00 2001
2From: Daniel Stenberg <daniel@haxx.se>
3Date: Tue, 1 Aug 2017 17:16:07 +0200
4Subject: [PATCH] glob: do not continue parsing after a strtoul() overflow
5 range
6
7Added test 1289 to verify.
8
9CVE: CVE-2017-1000101
10
11Bug: https://curl.haxx.se/docs/adv_20170809A.html
12Reported-by: Brian Carpenter
13
14Upstream-Status: Backport
15https://github.com/curl/curl/commit/453e7a7a03a2cec749abd3878a48e728c515cca7
16
17Rebase the tests/data/Makefile.inc changes for curl 7.54.1.
18
19Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
20---
21 src/tool_urlglob.c | 5 ++++-
22 tests/data/Makefile.inc | 2 +-
23 tests/data/test1289 | 35 +++++++++++++++++++++++++++++++++++
24 3 files changed, 40 insertions(+), 2 deletions(-)
25 create mode 100644 tests/data/test1289
26
27diff --git a/src/tool_urlglob.c b/src/tool_urlglob.c
28index 6b1ece0..d56dcd9 100644
29--- a/src/tool_urlglob.c
30+++ b/src/tool_urlglob.c
31@@ -273,7 +273,10 @@ static CURLcode glob_range(URLGlob *glob, char **patternp,
32 }
33 errno = 0;
34 max_n = strtoul(pattern, &endp, 10);
35- if(errno || (*endp == ':')) {
36+ if(errno)
37+ /* overflow */
38+ endp = NULL;
39+ else if(*endp == ':') {
40 pattern = endp+1;
41 errno = 0;
42 step_n = strtoul(pattern, &endp, 10);
43diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
44index 155320a..7adbee6 100644
45--- a/tests/data/Makefile.inc
46+++ b/tests/data/Makefile.inc
47@@ -132,7 +132,7 @@ test1252 test1253 test1254 test1255 test1256 test1257 test1258 test1259 \
48 test1260 test1261 test1262 \
49 \
50 test1280 test1281 test1282 test1283 test1284 test1285 test1286 test1287 \
51-test1288 \
52+test1288 test1289 \
53 \
54 test1300 test1301 test1302 test1303 test1304 test1305 test1306 test1307 \
55 test1308 test1309 test1310 test1311 test1312 test1313 test1314 test1315 \
56diff --git a/tests/data/test1289 b/tests/data/test1289
57new file mode 100644
58index 0000000..d679cc0
59--- /dev/null
60+++ b/tests/data/test1289
61@@ -0,0 +1,35 @@
62+<testcase>
63+<info>
64+<keywords>
65+HTTP
66+HTTP GET
67+globbing
68+</keywords>
69+</info>
70+
71+#
72+# Server-side
73+<reply>
74+</reply>
75+
76+# Client-side
77+<client>
78+<server>
79+http
80+</server>
81+<name>
82+globbing with overflow and bad syntxx
83+</name>
84+<command>
85+http://ur%20[0-60000000000000000000
86+</command>
87+</client>
88+
89+# Verify data after the test has been "shot"
90+<verify>
91+# curl: (3) [globbing] bad range in column
92+<errorcode>
93+3
94+</errorcode>
95+</verify>
96+</testcase>
97--
982.11.0
99
diff --git a/meta/recipes-support/curl/curl/CVE-2017-1000254.patch b/meta/recipes-support/curl/curl/CVE-2017-1000254.patch
deleted file mode 100644
index 2b0798b929..0000000000
--- a/meta/recipes-support/curl/curl/CVE-2017-1000254.patch
+++ /dev/null
@@ -1,138 +0,0 @@
1From 1b2eba6f9745c064f7283e0ada8f46df9d9d6e42 Mon Sep 17 00:00:00 2001
2From: Li Zhou <li.zhou@windriver.com>
3Date: Mon, 23 Oct 2017 00:26:50 -0700
4Subject: [PATCH] FTP: zero terminate the entry path even on bad input
5
6... a single double quote could leave the entry path buffer without a zero
7terminating byte. CVE-2017-1000254
8
9Test 1152 added to verify.
10
11Reported-by: Max Dymond
12Bug: https://curl.haxx.se/docs/adv_20171004.html
13
14Upstream-Status: Backport
15CVE: CVE-2017-1000254
16Signed-off-by: Li Zhou <li.zhou@windriver.com>
17---
18 lib/ftp.c | 7 ++++--
19 tests/data/Makefile.inc | 2 ++
20 tests/data/test1152 | 61 +++++++++++++++++++++++++++++++++++++++++++++++++
21 3 files changed, 68 insertions(+), 2 deletions(-)
22 create mode 100644 tests/data/test1152
23
24diff --git a/lib/ftp.c b/lib/ftp.c
25index 5edec37..493dbf9 100644
26--- a/lib/ftp.c
27+++ b/lib/ftp.c
28@@ -2826,6 +2826,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
29 const size_t buf_size = data->set.buffer_size;
30 char *dir;
31 char *store;
32+ bool entry_extracted = FALSE;
33
34 dir = malloc(nread + 1);
35 if(!dir)
36@@ -2857,7 +2858,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
37 }
38 else {
39 /* end of path */
40- *store = '\0'; /* zero terminate */
41+ entry_extracted = TRUE;
42 break; /* get out of this loop */
43 }
44 }
45@@ -2866,7 +2867,9 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
46 store++;
47 ptr++;
48 }
49-
50+ *store = '\0'; /* zero terminate */
51+ }
52+ if(entry_extracted) {
53 /* If the path name does not look like an absolute path (i.e.: it
54 does not start with a '/'), we probably need some server-dependent
55 adjustments. For example, this is the case when connecting to
56diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
57index 7adbee6..5284654 100644
58--- a/tests/data/Makefile.inc
59+++ b/tests/data/Makefile.inc
60@@ -121,6 +121,8 @@ test1120 test1121 test1122 test1123 test1124 test1125 test1126 test1127 \
61 test1128 test1129 test1130 test1131 test1132 test1133 test1134 test1135 \
62 test1136 test1137 test1138 test1139 test1140 test1141 test1142 test1143 \
63 test1144 test1145 test1146 \
64+test1152 \
65+\
66 test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \
67 test1208 test1209 test1210 test1211 test1212 test1213 test1214 test1215 \
68 test1216 test1217 test1218 test1219 \
69diff --git a/tests/data/test1152 b/tests/data/test1152
70new file mode 100644
71index 0000000..aa8c0a7
72--- /dev/null
73+++ b/tests/data/test1152
74@@ -0,0 +1,61 @@
75+<testcase>
76+<info>
77+<keywords>
78+FTP
79+PASV
80+LIST
81+</keywords>
82+</info>
83+#
84+# Server-side
85+<reply>
86+<servercmd>
87+REPLY PWD 257 "just one
88+</servercmd>
89+
90+# When doing LIST, we get the default list output hard-coded in the test
91+# FTP server
92+<data mode="text">
93+total 20
94+drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
95+drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
96+drwxr-xr-x 2 98 98 512 May 2 1996 curl-releases
97+-r--r--r-- 1 0 1 35 Jul 16 1996 README
98+lrwxrwxrwx 1 0 1 7 Dec 9 1999 bin -> usr/bin
99+dr-xr-xr-x 2 0 1 512 Oct 1 1997 dev
100+drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
101+dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
102+drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
103+dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
104+</data>
105+</reply>
106+
107+#
108+# Client-side
109+<client>
110+<server>
111+ftp
112+</server>
113+ <name>
114+FTP with uneven quote in PWD response
115+ </name>
116+ <command>
117+ftp://%HOSTIP:%FTPPORT/test-1152/
118+</command>
119+</client>
120+
121+#
122+# Verify data after the test has been "shot"
123+<verify>
124+<protocol>
125+USER anonymous
126+PASS ftp@example.com
127+PWD
128+CWD test-1152
129+EPSV
130+TYPE A
131+LIST
132+QUIT
133+</protocol>
134+</verify>
135+</testcase>
136--
1372.11.0
138
diff --git a/meta/recipes-support/curl/curl/reproducible-mkhelp.patch b/meta/recipes-support/curl/curl/reproducible-mkhelp.patch
deleted file mode 100644
index 268bbebf09..0000000000
--- a/meta/recipes-support/curl/curl/reproducible-mkhelp.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1From 1fe92fd3dd64c7228f6ff41e3fc16c4f2392471a Mon Sep 17 00:00:00 2001
2From: Juro Bystricky <juro.bystricky@intel.com>
3Date: Fri, 27 Oct 2017 08:28:25 -0700
4Subject: mkhelp.pl: support reproducible build
5
6Do not generate line with the current date, such as:
7
8* Generation time: Tue Oct-24 18:01:41 2017
9
10This will improve reproducibility. The generated string is only
11part of a comment, so there should be no adverse consequences.
12
13Upstream-Status: Submitted [ https://github.com/curl/curl/pull/2026 ]
14
15Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
16
17diff --git a/src/mkhelp.pl b/src/mkhelp.pl
18index 270daa2..757f024 100755
19--- a/src/mkhelp.pl
20+++ b/src/mkhelp.pl
21@@ -102,11 +102,9 @@ while(<READ>) {
22 }
23 close(READ);
24
25-$now = localtime;
26 print <<HEAD
27 /*
28 * NEVER EVER edit this manually, fix the mkhelp.pl script instead!
29- * Generation time: $now
30 */
31 #ifdef USE_MANUAL
32 #include "tool_hugehelp.h"
diff --git a/meta/recipes-support/curl/curl_7.54.1.bb b/meta/recipes-support/curl/curl_7.57.0.bb
index 58f05316fe..47e3d45460 100644
--- a/meta/recipes-support/curl/curl_7.54.1.bb
+++ b/meta/recipes-support/curl/curl_7.57.0.bb
@@ -7,23 +7,16 @@ LIC_FILES_CHKSUM = "file://COPYING;beginline=8;md5=3a34942f4ae3fbf1a303160714e66
7 7
8SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \ 8SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \
9 file://0001-replace-krb5-config-with-pkg-config.patch \ 9 file://0001-replace-krb5-config-with-pkg-config.patch \
10 file://CVE-2017-1000099.patch \
11 file://CVE-2017-1000100.patch \
12 file://CVE-2017-1000101.patch \
13 file://CVE-2017-1000254.patch \
14" 10"
15 11
16SRC_URI_append_class-target = " \
17 file://reproducible-mkhelp.patch \
18"
19 12
20# curl likes to set -g0 in CFLAGS, so we stop it 13# curl likes to set -g0 in CFLAGS, so we stop it
21# from mucking around with debug options 14# from mucking around with debug options
22# 15#
23SRC_URI += " file://configure_ac.patch" 16SRC_URI += " file://configure_ac.patch"
24 17
25SRC_URI[md5sum] = "6b6eb722f512e7a24855ff084f54fe55" 18SRC_URI[md5sum] = "dd3e22e923be17663e67f721c2aec054"
26SRC_URI[sha256sum] = "fdfc4df2d001ee0c44ec071186e770046249263c491fcae48df0e1a3ca8f25a0" 19SRC_URI[sha256sum] = "c92fe31a348eae079121b73884065e600c533493eb50f1f6cee9c48a3f454826"
27 20
28CVE_PRODUCT = "libcurl" 21CVE_PRODUCT = "libcurl"
29inherit autotools pkgconfig binconfig multilib_header 22inherit autotools pkgconfig binconfig multilib_header
@@ -64,9 +57,6 @@ EXTRA_OECONF = " \
64 --without-libpsl \ 57 --without-libpsl \
65" 58"
66 59
67do_install_append() {
68 oe_multilib_header curl/curlbuild.h
69}
70 60
71do_install_append_class-target() { 61do_install_append_class-target() {
72 # cleanup buildpaths from curl-config 62 # cleanup buildpaths from curl-config