summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support
diff options
context:
space:
mode:
authorThiruvadi Rajaraman <trajaraman@mvista.com>2017-11-04 07:53:26 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-11-21 14:43:54 +0000
commit5d93f6b23b1cb15995545122918216819243a231 (patch)
tree5e7440a2810fa8eb3507c65e3ff30571fbb5715c /meta/recipes-support
parentb29b1bc1d7f0fa599bf164ae8e2c2ca10751203f (diff)
downloadpoky-5d93f6b23b1cb15995545122918216819243a231.tar.gz
curl: Security fix for CVE-2016-8619
Affected versions: curl 7.3 to and including 7.50.3 Not affected versions: curl < 7.3 and curl >= 7.51.0 (From OE-Core rev: 3b97fc78d9cfee6586f3d55f04f20f72fd1af8dd) Signed-off-by: Thiruvadi Rajaraman <trajaraman@mvista.com> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support')
-rw-r--r--meta/recipes-support/curl/curl/CVE-2016-8619.patch56
-rw-r--r--meta/recipes-support/curl/curl_7.50.1.bb1
2 files changed, 57 insertions, 0 deletions
diff --git a/meta/recipes-support/curl/curl/CVE-2016-8619.patch b/meta/recipes-support/curl/curl/CVE-2016-8619.patch
new file mode 100644
index 0000000000..2c8f0599b2
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2016-8619.patch
@@ -0,0 +1,56 @@
1From 91239f7040b1f026d4d15765e7e3f58e92e93761 Mon Sep 17 00:00:00 2001
2From: Daniel Stenberg <daniel@haxx.se>
3Date: Wed, 28 Sep 2016 12:56:02 +0200
4Subject: [PATCH] krb5: avoid realloc(0)
5
6If the requested size is zero, bail out with error instead of doing a
7realloc() that would cause a double-free: realloc(0) acts as a free()
8and then there's a second free in the cleanup path.
9
10CVE-2016-8619
11
12Bug: https://curl.haxx.se/docs/adv_20161102E.html
13Reported-by: Cure53
14
15Upstream-Status: Backport
16https://curl.haxx.se/CVE-2016-8619.patch
17CVE: CVE-2016-8619
18Signed-off-by: Thiruvadi Rajaraman <trajaraman@mvista.com>
19
20---
21 lib/security.c | 9 ++++++---
22 1 file changed, 6 insertions(+), 3 deletions(-)
23
24diff --git a/lib/security.c b/lib/security.c
25index a268d4a..4cef8f8 100644
26--- a/lib/security.c
27+++ b/lib/security.c
28@@ -190,19 +190,22 @@ socket_write(struct connectdata *conn, curl_socket_t fd, const void *to,
29 static CURLcode read_data(struct connectdata *conn,
30 curl_socket_t fd,
31 struct krb5buffer *buf)
32 {
33 int len;
34- void* tmp;
35+ void *tmp = NULL;
36 CURLcode result;
37
38 result = socket_read(fd, &len, sizeof(len));
39 if(result)
40 return result;
41
42- len = ntohl(len);
43- tmp = realloc(buf->data, len);
44+ if(len) {
45+ /* only realloc if there was a length */
46+ len = ntohl(len);
47+ tmp = realloc(buf->data, len);
48+ }
49 if(tmp == NULL)
50 return CURLE_OUT_OF_MEMORY;
51
52 buf->data = tmp;
53 result = socket_read(fd, buf->data, len);
54--
552.9.3
56
diff --git a/meta/recipes-support/curl/curl_7.50.1.bb b/meta/recipes-support/curl/curl_7.50.1.bb
index 5c63996df1..544110134c 100644
--- a/meta/recipes-support/curl/curl_7.50.1.bb
+++ b/meta/recipes-support/curl/curl_7.50.1.bb
@@ -15,6 +15,7 @@ SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \
15SRC_URI += " file://configure_ac.patch \ 15SRC_URI += " file://configure_ac.patch \
16 file://CVE-2016-8615.patch \ 16 file://CVE-2016-8615.patch \
17 file://CVE-2016-8618.patch \ 17 file://CVE-2016-8618.patch \
18 file://CVE-2016-8619.patch \
18 " 19 "
19 20
20SRC_URI[md5sum] = "015f6a0217ca6f2c5442ca406476920b" 21SRC_URI[md5sum] = "015f6a0217ca6f2c5442ca406476920b"