summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSona Sarmadi <sona.sarmadi@enea.com>2016-11-15 09:08:15 (GMT)
committerSona Sarmadi <sona.sarmadi@enea.com>2017-02-10 11:21:37 (GMT)
commit3b8cc15b749578c70ddd1a2bd2d18dea16f93c0d (patch)
treef47f89f456c7e0d0ad9ea09d8aca2a0a7e900b74
parent68e224826ee278d35d01b2bd9678dd52d6352da1 (diff)
downloadpoky-3b8cc15b749578c70ddd1a2bd2d18dea16f93c0d.tar.gz
curl: CVE-2016-8620
glob parser write/read out of bounds Affected versions: curl 7.34.0 to and including 7.50.3 Reference: https://curl.haxx.se/docs/adv_20161102F.html Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta/recipes-support/curl/curl/CVE-2016-8620.patch44
-rw-r--r--meta/recipes-support/curl/curl_7.47.1.bb1
2 files changed, 45 insertions, 0 deletions
diff --git a/meta/recipes-support/curl/curl/CVE-2016-8620.patch b/meta/recipes-support/curl/curl/CVE-2016-8620.patch
new file mode 100644
index 0000000..613ace3
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2016-8620.patch
@@ -0,0 +1,44 @@
1From fbb5f1aa0326d485d5a7ac643b48481897ca667f Mon Sep 17 00:00:00 2001
2From: Daniel Stenberg <daniel@haxx.se>
3Date: Mon, 3 Oct 2016 17:27:16 +0200
4Subject: [PATCH] range: prevent negative end number in a glob range
5
6CVE: CVE-2016-8620
7
8Upstream-Status: Backport
9
10Bug: https://curl.haxx.se/docs/adv_20161102F.html
11Reported-by: Luật Nguyễn
12Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
13---
14 src/tool_urlglob.c | 7 +++++++
15 1 file changed, 7 insertions(+)
16
17diff --git a/src/tool_urlglob.c b/src/tool_urlglob.c
18index a357b8b..64c75ba 100644
19--- a/src/tool_urlglob.c
20+++ b/src/tool_urlglob.c
21@@ -257,6 +257,12 @@ static CURLcode glob_range(URLGlob *glob, char **patternp,
22 endp = NULL;
23 else {
24 pattern = endp+1;
25+ while(*pattern && ISBLANK(*pattern))
26+ pattern++;
27+ if(!ISDIGIT(*pattern)) {
28+ endp = NULL;
29+ goto fail;
30+ }
31 errno = 0;
32 max_n = strtoul(pattern, &endp, 10);
33 if(errno || (*endp == ':')) {
34@@ -277,6 +283,7 @@ static CURLcode glob_range(URLGlob *glob, char **patternp,
35 }
36 }
37
38+ fail:
39 *posp += (pattern - *patternp);
40
41 if(!endp || (min_n > max_n) || (step_n > (max_n - min_n)) || !step_n)
42--
431.9.1
44
diff --git a/meta/recipes-support/curl/curl_7.47.1.bb b/meta/recipes-support/curl/curl_7.47.1.bb
index 9ef5718..e6ad03f 100644
--- a/meta/recipes-support/curl/curl_7.47.1.bb
+++ b/meta/recipes-support/curl/curl_7.47.1.bb
@@ -20,6 +20,7 @@ SRC_URI += " file://configure_ac.patch \
20 file://CVE-2016-8617.patch \ 20 file://CVE-2016-8617.patch \
21 file://CVE-2016-8618.patch \ 21 file://CVE-2016-8618.patch \
22 file://CVE-2016-8619.patch \ 22 file://CVE-2016-8619.patch \
23 file://CVE-2016-8620.patch \
23 " 24 "
24 25
25SRC_URI[md5sum] = "9ea3123449439bbd960cd25cf98796fb" 26SRC_URI[md5sum] = "9ea3123449439bbd960cd25cf98796fb"