aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/curl/APKBUILD14
-rw-r--r--main/curl/CVE-2017-1000257.patch37
2 files changed, 47 insertions, 4 deletions
diff --git a/main/curl/APKBUILD b/main/curl/APKBUILD
index 6727620332..190d8727e0 100644
--- a/main/curl/APKBUILD
+++ b/main/curl/APKBUILD
@@ -3,7 +3,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=curl
pkgver=7.55.0
-pkgrel=1
+pkgrel=2
pkgdesc="An URL retrival utility and library"
url="http://curl.haxx.se"
arch="all"
@@ -15,11 +15,14 @@ subpackages="$pkgname-doc $pkgname-dev"
source="http://curl.haxx.se/download/curl-$pkgver.tar.bz2
curl-do-bounds-check-using-a-double-comparison.patch
CVE-2017-1000254.patch
+ CVE-2017-1000257.patch
"
_builddir="$srcdir/$pkgname-$pkgver"
# secfixes:
+# 7.55.0-r2:
+# - CVE-2017-1000257
# 7.55.0-r1:
# - CVE-2017-1000254
# 7.55.0-r0:
@@ -91,10 +94,13 @@ package() {
md5sums="90cd4d6b20fa7655d2b75efe09fd7bfe curl-7.55.0.tar.bz2
feda61a45b36819f4fd5c7a6fadeaf8c curl-do-bounds-check-using-a-double-comparison.patch
-2e67e36a5b8582ce5fed4e56811aa55e CVE-2017-1000254.patch"
+2e67e36a5b8582ce5fed4e56811aa55e CVE-2017-1000254.patch
+cf77d2a07b354c1bfceed968c03a9c49 CVE-2017-1000257.patch"
sha256sums="af1d69ec6f15fe70a2cabaa98309732bf035ef2a735e4e1a3e08754d2780e5b1 curl-7.55.0.tar.bz2
de1bc7dfc6bad0f67743e4a0e5707458e7607cbacf61de51eaeb597cd07710d7 curl-do-bounds-check-using-a-double-comparison.patch
-b6c62ea72cd02e7d35280fad8b77007be4f8527debd1f8a6b201a8b00ed1359c CVE-2017-1000254.patch"
+b6c62ea72cd02e7d35280fad8b77007be4f8527debd1f8a6b201a8b00ed1359c CVE-2017-1000254.patch
+4679ae8314f41a926a39604d882cc8606a3ce1c83364dd36098d8decc0788686 CVE-2017-1000257.patch"
sha512sums="4975864621219e937585aaf5a9a54bba112b58bbf5a8acd92e1e972ea747a15a5564143548c5d8930b8c0d0e9d27d28225d0c81e52a1ba71e4c6f9e3859c978b curl-7.55.0.tar.bz2
d0f102fdbc2174169b2fea9248c3187d8c546d3a788447769dceec5fb7e063adbebbc967b88d208af1355cfda600f837abdae6d2e057a096eededc1857d2b8d3 curl-do-bounds-check-using-a-double-comparison.patch
-9ffb77d823eed786ed2dc03ab01948761e754ed74be3dde8d8fac7f3ec77f997826f5908a45d042c359d16d2ce300612ea694f89f46c995825733272ae7d0326 CVE-2017-1000254.patch"
+9ffb77d823eed786ed2dc03ab01948761e754ed74be3dde8d8fac7f3ec77f997826f5908a45d042c359d16d2ce300612ea694f89f46c995825733272ae7d0326 CVE-2017-1000254.patch
+b104908d5db7c33c91bd3bd050873682c88676a40d983ec695cd723ddc291aae7d9c3070d2f00080d3f824450dfcabcae37249b9f919cda6c4389ea598d4696c CVE-2017-1000257.patch"
diff --git a/main/curl/CVE-2017-1000257.patch b/main/curl/CVE-2017-1000257.patch
new file mode 100644
index 0000000000..4159a89981
--- /dev/null
+++ b/main/curl/CVE-2017-1000257.patch
@@ -0,0 +1,37 @@
+From 13c9a9ded3ae744a1e11cbc14e9146d9fa427040 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg <daniel@haxx.se>
+Date: Sat, 7 Oct 2017 00:11:31 +0200
+Subject: [PATCH] imap: if a FETCH response has no size, don't call write
+ callback
+
+CVE-2017-1000257
+
+Reported-by: Brian Carpenter and 0xd34db347
+Also detected by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3586
+---
+ lib/imap.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/lib/imap.c b/lib/imap.c
+index 954d18f37..baa31a2f8 100644
+--- a/lib/imap.c
++++ b/lib/imap.c
+@@ -1124,10 +1124,15 @@ static CURLcode imap_state_fetch_resp(struct connectdata *conn, int imapcode,
+
+ if(chunk > (size_t)size)
+ /* The conversion from curl_off_t to size_t is always fine here */
+ chunk = (size_t)size;
+
++ if(!chunk) {
++ /* no size, we're done with the data */
++ state(conn, IMAP_STOP);
++ return CURLE_OK;
++ }
+ result = Curl_client_write(conn, CLIENTWRITE_BODY, pp->cache, chunk);
+ if(result)
+ return result;
+
+ data->req.bytecount += chunk;
+--
+2.15.0.rc1
+