Browse code

Update curl to version 7.56.1 and update sysdig to version 0.19.1

Change-Id: Ia781986de97a1d6f4e153833ca4f237ecda71af0
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/4519
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Anish Swaminathan <anishs@vmware.com>

xiaolin-vmware authored on 2017/12/14 14:47:21
Showing 8 changed files
1 1
deleted file mode 100644
... ...
@@ -1,35 +0,0 @@
1
-From ccb7d79b62c8b15a6be446f9c9fd3767c01eb5b6 Mon Sep 17 00:00:00 2001
2
-From: Daniel Stenberg <daniel@haxx.se>
3
-Date: Sun, 31 Jul 2016 01:09:04 +0200
4
-Subject: [PATCH] curl_multi_cleanup: clear connection pointer for easy handles
5
-MIME-Version: 1.0
6
-Content-Type: text/plain; charset=UTF-8
7
-Content-Transfer-Encoding: 8bit
8
-
9
-CVE-2016-5421
10
-Bug: https://curl.haxx.se/docs/adv_20160803C.html
11
-Reported-by: Marcelo Echeverria and Fernando Muñoz
12
- lib/multi.c | 2 ++
13
- 1 file changed, 2 insertions(+)
14
-
15
-diff --git a/lib/multi.c b/lib/multi.c
16
-index 9ee3523..8bb9366 100644
17
-+++ b/lib/multi.c
18
-@@ -2155,10 +2155,12 @@ static void close_all_connections(struct Curl_multi *multi)
19
-   while(conn) {
20
-     SIGPIPE_VARIABLE(pipe_st);
21
-     conn->data = multi->closure_handle;
22
- 
23
-     sigpipe_ignore(conn->data, &pipe_st);
24
-+    conn->data->easy_conn = NULL; /* clear the easy handle's connection
25
-+                                     pointer */
26
-     /* This will remove the connection from the cache */
27
-     (void)Curl_disconnect(conn, FALSE);
28
-     sigpipe_restore(&pipe_st);
29
- 
30
-     conn = Curl_conncache_find_first_connection(&multi->conn_cache);
31
-2.8.1
32
-
33 1
deleted file mode 100644
... ...
@@ -1,53 +0,0 @@
1
-diff --git a/lib/escape.c b/lib/escape.c
2
-index 40338a9..808ac6c 100644
3
-+++ b/lib/escape.c
4
-@@ -78,15 +78,21 @@ char *curl_unescape(const char *string, int length)
5
- 
6
- char *curl_easy_escape(CURL *handle, const char *string, int inlength)
7
- {
8
--  size_t alloc = (inlength?(size_t)inlength:strlen(string))+1;
9
-+  size_t alloc;
10
-   char *ns;
11
-   char *testing_ptr = NULL;
12
-   unsigned char in; /* we need to treat the characters unsigned */
13
--  size_t newlen = alloc;
14
-+  size_t newlen;
15
-   size_t strindex=0;
16
-   size_t length;
17
-   CURLcode result;
18
- 
19
-+  if(inlength < 0)
20
-+    return NULL;
21
-+
22
-+  alloc = (inlength?(size_t)inlength:strlen(string))+1;
23
-+  newlen = alloc;
24
-+
25
-   ns = malloc(alloc);
26
-   if(!ns)
27
-     return NULL;
28
-@@ -211,14 +217,16 @@ char *curl_easy_unescape(CURL *handle, const char *string, int length,
29
-                          int *olen)
30
- {
31
-   char *str = NULL;
32
--  size_t inputlen = length;
33
--  size_t outputlen;
34
--  CURLcode res = Curl_urldecode(handle, string, inputlen, &str, &outputlen,
35
--                                FALSE);
36
--  if(res)
37
--    return NULL;
38
--  if(olen)
39
--    *olen = curlx_uztosi(outputlen);
40
-+  if(length >= 0) {
41
-+    size_t inputlen = length;
42
-+    size_t outputlen;
43
-+    CURLcode res = Curl_urldecode(handle, string, inputlen, &str, &outputlen,
44
-+                                  FALSE);
45
-+    if(res)
46
-+      return NULL;
47
-+    if(olen)
48
-+      *olen = curlx_uztosi(outputlen);
49
-+  }
50
-   return str;
51
- }
52
- 
53 1
deleted file mode 100644
... ...
@@ -1,54 +0,0 @@
1
-From 358b2b131ad6c095696f20dcfa62b8305263f898 Mon Sep 17 00:00:00 2001
2
-From: Daniel Stenberg <daniel@haxx.se>
3
-Date: Tue, 1 Aug 2017 17:16:46 +0200
4
-Subject: [PATCH] tftp: reject file name lengths that don't fit
5
-
6
-... and thereby avoid telling send() to send off more bytes than the
7
-size of the buffer!
8
-
9
-CVE-2017-1000100
10
-
11
-Bug: https://curl.haxx.se/docs/adv_20170809B.html
12
-Reported-by: Even Rouault
13
-
14
-Credit to OSS-Fuzz for the discovery
15
- lib/tftp.c | 7 ++++++-
16
- 1 file changed, 6 insertions(+), 1 deletion(-)
17
-
18
-diff --git a/lib/tftp.c b/lib/tftp.c
19
-index 02bd84242..f6f4bce5b 100644
20
-+++ b/lib/tftp.c
21
-@@ -3,11 +3,11 @@
22
-  *  Project                     ___| | | |  _ \| |
23
-  *                             / __| | | | |_) | |
24
-  *                            | (__| |_| |  _ <| |___
25
-  *                             \___|\___/|_| \_\_____|
26
-  *
27
-- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
28
-+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
29
-  *
30
-  * This software is licensed as described in the file COPYING, which
31
-  * you should have received as part of this distribution. The terms
32
-  * are also available at https://curl.haxx.se/docs/copyright.html.
33
-  *
34
-@@ -489,10 +489,15 @@ static CURLcode tftp_send_first(tftp_state_data_t *state, tftp_event_t event)
35
-     result = Curl_urldecode(data, &state->conn->data->state.path[1], 0,
36
-                             &filename, NULL, FALSE);
37
-     if(result)
38
-       return result;
39
- 
40
-+    if(strlen(filename) > (state->blksize - strlen(mode) - 4)) {
41
-+      failf(data, "TFTP file name too long\n");
42
-+      return CURLE_TFTP_ILLEGAL; /* too long file name field */
43
-+    }
44
-+
45
-     snprintf((char *)state->spacket.data+2,
46
-              state->blksize,
47
-              "%s%c%s%c", filename, '\0',  mode, '\0');
48
-     sbytes = 4 + strlen(filename) + strlen(mode);
49
- 
50
-2.13.3
51
-
52 1
deleted file mode 100644
... ...
@@ -1,96 +0,0 @@
1
-From 453e7a7a03a2cec749abd3878a48e728c515cca7 Mon Sep 17 00:00:00 2001
2
-From: Daniel Stenberg <daniel@haxx.se>
3
-Date: Tue, 1 Aug 2017 17:16:07 +0200
4
-Subject: [PATCH] glob: do not continue parsing after a strtoul() overflow
5
- range
6
-
7
-Added test 1289 to verify.
8
-
9
-CVE-2017-1000101
10
-
11
-Bug: https://curl.haxx.se/docs/adv_20170809A.html
12
-Reported-by: Brian Carpenter
13
- src/tool_urlglob.c      |  5 ++++-
14
- tests/data/Makefile.inc |  2 +-
15
- tests/data/test1289     | 35 +++++++++++++++++++++++++++++++++++
16
- 3 files changed, 40 insertions(+), 2 deletions(-)
17
- create mode 100644 tests/data/test1289
18
-
19
-diff --git a/src/tool_urlglob.c b/src/tool_urlglob.c
20
-index 6b1ece008..d56dcd912 100644
21
-+++ b/src/tool_urlglob.c
22
-@@ -271,11 +271,14 @@ static CURLcode glob_range(URLGlob *glob, char **patternp,
23
-           endp = NULL;
24
-           goto fail;
25
-         }
26
-         errno = 0;
27
-         max_n = strtoul(pattern, &endp, 10);
28
--        if(errno || (*endp == ':')) {
29
-+        if(errno)
30
-+          /* overflow */
31
-+          endp = NULL;
32
-+        else if(*endp == ':') {
33
-           pattern = endp+1;
34
-           errno = 0;
35
-           step_n = strtoul(pattern, &endp, 10);
36
-           if(errno)
37
-             /* over/underflow situation */
38
-diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
39
-index 35446cf71..59f692e8f 100644
40
-+++ b/tests/data/Makefile.inc
41
-@@ -130,7 +130,7 @@ test1252 test1253 test1254 test1255 test1256 test1257 test1258 test1259 \
42
- test1260 \
43
- \
44
- test1280 test1281 test1282 test1283 test1284 test1285 test1286 test1287 \
45
--test1288 \
46
-+test1288 test1289 \
47
- \
48
- test1300 test1301 test1302 test1303 test1304 test1305 test1306 test1307 \
49
- test1308 test1309 test1310 test1311 test1312 test1313 test1314 test1315 \
50
-diff --git a/tests/data/test1289 b/tests/data/test1289
51
-new file mode 100644
52
-index 000000000..d679cc0bc
53
-+++ b/tests/data/test1289
54
-@@ -0,0 +1,35 @@
55
-+<testcase>
56
-+<info>
57
-+<keywords>
58
-+HTTP
59
-+HTTP GET
60
-+globbing
61
-+</keywords>
62
-+</info>
63
-+
64
-+#
65
-+# Server-side
66
-+<reply>
67
-+</reply>
68
-+
69
-+# Client-side
70
-+<client>
71
-+<server>
72
-+http
73
-+</server>
74
-+<name>
75
-+globbing with overflow and bad syntxx
76
-+</name>
77
-+<command>
78
-+http://ur%20[0-60000000000000000000
79
-+</command>
80
-+</client>
81
-+
82
-+# Verify data after the test has been "shot"
83
-+<verify>
84
-+# curl: (3) [globbing] bad range in column 
85
-+<errorcode>
86
-+3
87
-+</errorcode>
88
-+</verify>
89
-+</testcase>
90
-2.13.3
91
-
92 1
deleted file mode 100644
... ...
@@ -1,133 +0,0 @@
1
-From 9d9157bb0c230c769fdf902ed3a62edf642d424b Mon Sep 17 00:00:00 2001
2
-From: Daniel Stenberg <daniel@haxx.se>
3
-Date: Mon, 25 Sep 2017 00:35:22 +0200
4
-Subject: [PATCH v2] 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
7
-terminating byte.
8
-
9
-Test 1152 added to verify.
10
-
11
-Reported-by: Max Dymond
12
- lib/ftp.c               |  7 ++++--
13
- tests/data/Makefile.inc |  1 +
14
- tests/data/test1152     | 61 +++++++++++++++++++++++++++++++++++++++++++++++++
15
- 3 files changed, 67 insertions(+), 2 deletions(-)
16
- create mode 100644 tests/data/test1152
17
-
18
-diff --git a/lib/ftp.c b/lib/ftp.c
19
-index 4860509f3..54ba4057f 100644
20
-+++ b/lib/ftp.c
21
-@@ -2825,7 +2825,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
22
-         const size_t buf_size = CURL_BUFSIZE(data->set.buffer_size);
23
-         char *dir;
24
-         char *store;
25
--
26
-+        bool entry_extracted = FALSE;
27
-         dir = malloc(nread + 1);
28
-         if(!dir)
29
-           return CURLE_OUT_OF_MEMORY;
30
-@@ -2856,7 +2856,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
31
-               }
32
-               else {
33
-                 /* end of path */
34
--                *store = '\0'; /* zero terminate */
35
-+                entry_extracted = TRUE;
36
-                 break; /* get out of this loop */
37
-               }
38
-             }
39
-@@ -2865,7 +2865,9 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
40
-             store++;
41
-             ptr++;
42
-           }
43
--
44
-+          *store = '\0'; /* zero terminate */
45
-+        }
46
-+        if(entry_extracted) {
47
-           /* If the path name does not look like an absolute path (i.e.: it
48
-              does not start with a '/'), we probably need some server-dependent
49
-              adjustments. For example, this is the case when connecting to
50
-diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
51
-index 1bfd75eca..268f5e29e 100644
52
-+++ b/tests/data/Makefile.inc
53
-@@ -121,6 +121,7 @@ test1120 test1121 test1122 test1123 test1124 test1125 test1126 test1127 \
54
- test1128 test1129 test1130 test1131 test1132 test1133 test1134 test1135 \
55
- test1136 test1137 test1138 test1139 test1140 test1141 test1142 test1143 \
56
- test1144 test1145 test1146 \
57
-+test1152 \
58
- test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \
59
- test1208 test1209 test1210 test1211 test1212 test1213 test1214 test1215 \
60
- test1216 test1217 test1218 test1219 \
61
-diff --git a/tests/data/test1152 b/tests/data/test1152
62
-new file mode 100644
63
-index 000000000..aa8c0a7e4
64
-+++ b/tests/data/test1152
65
-@@ -0,0 +1,61 @@
66
-+<testcase>
67
-+<info>
68
-+<keywords>
69
-+FTP
70
-+PASV
71
-+LIST
72
-+</keywords>
73
-+</info>
74
-+#
75
-+# Server-side
76
-+<reply>
77
-+<servercmd>
78
-+REPLY PWD 257 "just one
79
-+</servercmd>
80
-+
81
-+# When doing LIST, we get the default list output hard-coded in the test
82
-+# FTP server
83
-+<data mode="text">
84
-+total 20
85
-+drwxr-xr-x   8 98       98           512 Oct 22 13:06 .
86
-+drwxr-xr-x   8 98       98           512 Oct 22 13:06 ..
87
-+drwxr-xr-x   2 98       98           512 May  2  1996 curl-releases
88
-+-r--r--r--   1 0        1             35 Jul 16  1996 README
89
-+lrwxrwxrwx   1 0        1              7 Dec  9  1999 bin -> usr/bin
90
-+dr-xr-xr-x   2 0        1            512 Oct  1  1997 dev
91
-+drwxrwxrwx   2 98       98           512 May 29 16:04 download.html
92
-+dr-xr-xr-x   2 0        1            512 Nov 30  1995 etc
93
-+drwxrwxrwx   2 98       1            512 Oct 30 14:33 pub
94
-+dr-xr-xr-x   5 0        1            512 Oct  1  1997 usr
95
-+</data>
96
-+</reply>
97
-+
98
-+#
99
-+# Client-side
100
-+<client>
101
-+<server>
102
-+ftp
103
-+</server>
104
-+ <name>
105
-+FTP with uneven quote in PWD response
106
-+ </name>
107
-+ <command>
108
-+ftp://%HOSTIP:%FTPPORT/test-1152/
109
-+</command>
110
-+</client>
111
-+
112
-+#
113
-+# Verify data after the test has been "shot"
114
-+<verify>
115
-+<protocol>
116
-+USER anonymous
117
-+PASS ftp@example.com
118
-+PWD
119
-+CWD test-1152
120
-+EPSV
121
-+TYPE A
122
-+LIST
123
-+QUIT
124
-+</protocol>
125
-+</verify>
126
-+</testcase>
127
-2.14.1
128
-
129 1
deleted file mode 100644
... ...
@@ -1,37 +0,0 @@
1
-From 13c9a9ded3ae744a1e11cbc14e9146d9fa427040 Mon Sep 17 00:00:00 2001
2
-From: Daniel Stenberg <daniel@haxx.se>
3
-Date: Sat, 7 Oct 2017 00:11:31 +0200
4
-Subject: [PATCH] imap: if a FETCH response has no size, don't call write
5
- callback
6
-
7
-CVE-2017-1000257
8
-
9
-Reported-by: Brian Carpenter and 0xd34db347
10
-Also detected by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3586
11
- lib/imap.c | 5 +++++
12
- 1 file changed, 5 insertions(+)
13
-
14
-diff --git a/lib/imap.c b/lib/imap.c
15
-index 954d18f37..baa31a2f8 100644
16
-+++ b/lib/imap.c
17
-@@ -1124,10 +1124,15 @@ static CURLcode imap_state_fetch_resp(struct connectdata *conn, int imapcode,
18
- 
19
-       if(chunk > (size_t)size)
20
-         /* The conversion from curl_off_t to size_t is always fine here */
21
-         chunk = (size_t)size;
22
- 
23
-+      if(!chunk) {
24
-+        /* no size, we're done with the data */
25
-+        state(conn, IMAP_STOP);
26
-+        return CURLE_OK;
27
-+      }
28
-       result = Curl_client_write(conn, CLIENTWRITE_BODY, pp->cache, chunk);
29
-       if(result)
30
-         return result;
31
- 
32
-       data->req.bytecount += chunk;
33
-2.15.0.rc1
34
-
... ...
@@ -1,18 +1,14 @@
1 1
 Summary:        An URL retrieval utility and library
2 2
 Name:           curl
3
-Version:        7.54.0
4
-Release:        5%{?dist}
3
+Version:        7.56.1
4
+Release:        1%{?dist}
5 5
 License:        MIT
6 6
 URL:            http://curl.haxx.se
7 7
 Group:          System Environment/NetworkingLibraries
8 8
 Vendor:         VMware, Inc.
9 9
 Distribution:   Photon
10
-Source0:        http://curl.haxx.se/download/%{name}-%{version}.tar.lzma
11
-%define sha1    curl=a77da3cd2a9876bde3982976245ef2da9ad27847
12
-Patch0:         curl-CVE-2017-1000101.patch
13
-Patch1:         curl-CVE-2017-1000100.patch
14
-Patch2:         curl-CVE-2017-1000254.patch
15
-Patch3:         curl-CVE-2017-1000257.patch
10
+Source0:        http://curl.haxx.se/download/%{name}-%{version}.tar.xz
11
+%define sha1    curl=c26bd88fdd5fe5d31a3b9e7a0a6b3dffff3168df
16 12
 Requires:       ca-certificates
17 13
 BuildRequires:  ca-certificates
18 14
 Requires:       openssl
... ...
@@ -28,10 +24,6 @@ upload files can be incorporated into other programs to support
28 28
 functions like streaming media.
29 29
 %prep
30 30
 %setup -q
31
-%patch0 -p1
32
-%patch1 -p1
33
-%patch2 -p1
34
-%patch3 -p1
35 31
 sed -i '/--static-libs)/{N;s#echo .*#echo #;}' curl-config.in
36 32
 %build
37 33
 ./configure \
... ...
@@ -71,6 +63,8 @@ rm -rf %{buildroot}/*
71 71
 %{_datarootdir}/aclocal/libcurl.m4
72 72
 %{_docdir}/%{name}-%{version}
73 73
 %changelog
74
+*   Wed Dec 13 2017 Xiaolin Li <xiaolinl@vmware.com> 7.56.1-1
75
+-   Update to version 7.56.1
74 76
 *   Mon Nov 27 2017 Xiaolin Li <xiaolinl@vmware.com> 7.54.0-5
75 77
 -   Fix CVE-2017-1000257
76 78
 *   Mon Nov 06 2017 Xiaolin Li <xiaolinl@vmware.com> 7.54.0-4
... ...
@@ -1,26 +1,27 @@
1 1
 %global security_hardening none
2
-Summary:	Sysdig is a universal system visibility tool with native support for containers.
3
-Name:		sysdig
4
-Version:	0.10.1
5
-Release:	4%{?kernelsubrelease}%{?dist}
6
-License:	GPLv2	  
7
-URL:		http://www.sysdig.org/
8
-Group:		Applications/System	
9
-Vendor:		VMware, Inc.
10
-Distribution:	Photon
11
-Source0:	https://github.com/draios/sysdig/archive/%{name}-%{version}.tar.gz
12
-%define sha1 sysdig=272b95ad02be4d194bba66d360ff935084d9c842
13
-BuildRequires:	cmake 
2
+Summary:        Sysdig is a universal system visibility tool with native support for containers.
3
+Name:           sysdig
4
+Version:        0.19.1
5
+Release:        1%{?kernelsubrelease}%{?dist}
6
+License:        GPLv2
7
+URL:            http://www.sysdig.org/
8
+Group:          Applications/System
9
+Vendor:         VMware, Inc.
10
+Distribution:   Photon
11
+Source0:        https://github.com/draios/sysdig/archive/%{name}-%{version}.tar.gz
12
+%define sha1 sysdig=425ea9fab8e831274626a9c9e65f0dfb4f9bc019
13
+BuildRequires:  cmake
14 14
 BuildRequires:  linux-dev = %{KERNEL_VERSION}-%{KERNEL_RELEASE}
15
-BuildRequires:	openssl-devel
16
-BuildRequires:	curl
17
-BuildRequires:	zlib-devel
18
-BuildRequires:	ncurses-devel >= 6.0-3
19
-Requires:   linux = %{KERNEL_VERSION}-%{KERNEL_RELEASE}
20
-Requires:	zlib
21
-Requires:	ncurses >= 6.0-3
22
-Requires:	openssl
23
-Requires:	curl
15
+BuildRequires:  openssl-devel
16
+BuildRequires:  curl
17
+BuildRequires:  zlib-devel
18
+BuildRequires:  ncurses-devel >= 6.0-3
19
+BuildRequires:  wget
20
+Requires:       linux = %{KERNEL_VERSION}-%{KERNEL_RELEASE}
21
+Requires:       zlib
22
+Requires:       ncurses >= 6.0-3
23
+Requires:       openssl
24
+Requires:       curl
24 25
 
25 26
 %description
26 27
  Sysdig is open source, system-level exploration: capture system state and activity from a running Linux instance, then save, filter and analyze. Sysdig is scriptable in Lua and includes a command line interface and a powerful interactive UI, csysdig, that runs in your terminal
... ...
@@ -33,11 +34,11 @@ mkdir build
33 33
 cd build
34 34
 
35 35
 cmake \
36
-	-DCMAKE_INSTALL_PREFIX=%{_prefix} \
37
-	-DUSE_BUNDLED_OPENSSL=OFF \
38
-	-DUSE_BUNDLED_CURL=OFF \
39
-	-DUSE_BUNDLED_ZLIB=OFF \
40
-	-DUSE_BUNDLED_NCURSES=OFF ..
36
+    -DCMAKE_INSTALL_PREFIX=%{_prefix} \
37
+    -DUSE_BUNDLED_OPENSSL=OFF \
38
+    -DUSE_BUNDLED_CURL=OFF \
39
+    -DUSE_BUNDLED_ZLIB=OFF \
40
+    -DUSE_BUNDLED_NCURSES=OFF ..
41 41
 
42 42
 make KERNELDIR="/lib/modules/%{KERNEL_VERSION}-%{KERNEL_RELEASE}/build"
43 43
 
... ...
@@ -69,6 +70,8 @@ rm -rf %{buildroot}/*
69 69
 /lib/modules/%{KERNEL_VERSION}-%{KERNEL_RELEASE}/extra/sysdig-probe.ko
70 70
 
71 71
 %changelog
72
+*   Wed Dec 13 2017 Xiaolin Li <xiaolinl@vmware.com> 0.19.1-1
73
+-   Update to version 0.19.1
72 74
 *   Mon Apr 3 2017 Alexey Makhalov <amakhalov@vmware.com> 0.10.1-4
73 75
 -   Use specified version of ncurses wich has long chtype and mmask_t
74 76
     (see ncurses changelog)