aboutsummaryrefslogtreecommitdiffstats
path: root/main/varnish/fix-stack-overflow.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2017-11-21 12:13:33 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2017-11-22 10:07:38 +0100
commit336cc11a149e0b1e44bf74c1ba3fa8aa340a828f (patch)
tree2dd0f858733cb5a7dd0863bce4bd6b7afccf4d25 /main/varnish/fix-stack-overflow.patch
parent34e89c4d9e42e4680ca030051e82b28a2c22a508 (diff)
downloadaports-336cc11a149e0b1e44bf74c1ba3fa8aa340a828f.tar.bz2
aports-336cc11a149e0b1e44bf74c1ba3fa8aa340a828f.tar.xz
main/varnish: security upgrade to 4.1.9 (CVE-2017-8807)
fixes #8168
Diffstat (limited to 'main/varnish/fix-stack-overflow.patch')
-rw-r--r--main/varnish/fix-stack-overflow.patch16
1 files changed, 8 insertions, 8 deletions
diff --git a/main/varnish/fix-stack-overflow.patch b/main/varnish/fix-stack-overflow.patch
index 67677b3306..23fb7cc12c 100644
--- a/main/varnish/fix-stack-overflow.patch
+++ b/main/varnish/fix-stack-overflow.patch
@@ -1,6 +1,6 @@
-From bc0b56b8703e7e02af745af28bc6fff48ab806ba Mon Sep 17 00:00:00 2001
+From f88f2ead8cc5958262d333c46e94ddc8a3c9ae18 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Wed, 2 Mar 2016 10:46:49 +0100
+Date: Tue, 21 Nov 2017 12:10:34 +0100
Subject: [PATCH] fix stack overflow in epoll waiter
musl libc has a default thread stack of 80k. avoid overflow the stack by
@@ -10,10 +10,10 @@ allocating the epol_event array on heap instead of stack.
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/bin/varnishd/waiter/cache_waiter_epoll.c b/bin/varnishd/waiter/cache_waiter_epoll.c
-index f50ae46..65719e5 100644
+index 71c426a..ccbc64c 100644
--- a/bin/varnishd/waiter/cache_waiter_epoll.c
+++ b/bin/varnishd/waiter/cache_waiter_epoll.c
-@@ -71,7 +71,7 @@ struct vwe {
+@@ -74,7 +74,7 @@ struct vwe {
static void *
vwe_thread(void *priv)
{
@@ -22,16 +22,16 @@ index f50ae46..65719e5 100644
struct waited *wp;
struct waiter *w;
double now, then;
-@@ -83,6 +83,8 @@ vwe_thread(void *priv)
- w = vwe->waiter;
+@@ -87,6 +87,8 @@ vwe_thread(void *priv)
CHECK_OBJ_NOTNULL(w, WAITER_MAGIC);
THR_SetName("cache-epoll");
+ THR_Init();
+ ev = malloc(NEEV * sizeof(struct epoll_event));
+ assert(ev != NULL);
now = VTIM_real();
while (1) {
-@@ -146,6 +148,7 @@ vwe_thread(void *priv)
+@@ -154,6 +156,7 @@ vwe_thread(void *priv)
AZ(close(vwe->pipe[0]));
AZ(close(vwe->pipe[1]));
AZ(close(vwe->epfd));
@@ -40,5 +40,5 @@ index f50ae46..65719e5 100644
}
--
-2.7.2
+2.13.5