aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2020-01-26 21:40:51 +0100
committerJakub Jirutka <jakub@jirutka.cz>2020-01-26 21:56:31 +0100
commitb8e0913221a8801e03e073be93e3b20c0bcb5781 (patch)
treef1b196688a23082e053c85a0f61a5482b61a4e28
parent28c5b6b96c641067fcdaf29f9e1f526eb28cd10f (diff)
downloadaports-b8e0913221a8801e03e073be93e3b20c0bcb5781.tar.gz
aports-b8e0913221a8801e03e073be93e3b20c0bcb5781.tar.bz2
aports-b8e0913221a8801e03e073be93e3b20c0bcb5781.tar.xz
main/freeradius: fix segfault in process request_running()
-rw-r--r--main/freeradius/APKBUILD6
-rw-r--r--main/freeradius/fix-request_running-segfault.patch23
2 files changed, 27 insertions, 2 deletions
diff --git a/main/freeradius/APKBUILD b/main/freeradius/APKBUILD
index 5fda4999c1..4119473805 100644
--- a/main/freeradius/APKBUILD
+++ b/main/freeradius/APKBUILD
@@ -5,7 +5,7 @@
pkgname=freeradius
_realname=freeradius
pkgver=3.0.20
-pkgrel=1
+pkgrel=2
pkgdesc="RADIUS (Remote Authentication Dial-In User Service) server"
url="https://freeradius.org/"
arch="all"
@@ -31,6 +31,7 @@ source="ftp://ftp.freeradius.org/pub/freeradius/$_realname-server-$pkgver.tar.gz
fix-scopeid.patch
freeradius-313-default-config.patch
Fix-permissions-of-certs-in-bootstrap-fallback.patch
+ fix-request_running-segfault.patch
"
builddir="$srcdir"/$_realname-server-$pkgver
@@ -290,4 +291,5 @@ ba3c424d4eabb147c7aa3e31575a87ddb26b6a792d2a8714e73d8763e07854326a03a83991a74202
c49e5eec7497fccde5fd09dba1ea9b846e57bc88015bd81640aa531fb5c9b449f37136f42c85fe1d7940c5963aed664b85da28442b388c9fb8cc27873df03b2d musl-fix-headers.patch
41d478c0e40ff82fc36232964037c1ab8ffca9fdbb7dca02ed49319906e751c133b5d7bc7773c645cec6d9d39d1de69cba25e8d59afa8d6662563dd17f35f234 fix-scopeid.patch
666e15a3c3e5b98ff8c3168de85b341606af5e2790af379ddec46464e9d7de14a715876a34ba1eb7fa47ddead23f7134128d591db32309db0e4acbdb6f21ef5e freeradius-313-default-config.patch
-f88cb4ae335d67211c8563b6df88e20ee3729e57aa56423f99b518f83b190479b38bb189a0ab53c70ef9709a6229ccaa506ea6b79844cbfd4f2a7f0c7c292045 Fix-permissions-of-certs-in-bootstrap-fallback.patch"
+f88cb4ae335d67211c8563b6df88e20ee3729e57aa56423f99b518f83b190479b38bb189a0ab53c70ef9709a6229ccaa506ea6b79844cbfd4f2a7f0c7c292045 Fix-permissions-of-certs-in-bootstrap-fallback.patch
+7ddf75901f635216b0d972c14631334a8138e0dbb021685bb6b3a996f38d232b84146c621dae541b00f6149fa401e835d1579bbacd27fad72a80bacd4391b404 fix-request_running-segfault.patch"
diff --git a/main/freeradius/fix-request_running-segfault.patch b/main/freeradius/fix-request_running-segfault.patch
new file mode 100644
index 0000000000..d1ca890302
--- /dev/null
+++ b/main/freeradius/fix-request_running-segfault.patch
@@ -0,0 +1,23 @@
+From 30ffd2174ec0acd1c5b4b4988d522c24d80a1049 Mon Sep 17 00:00:00 2001
+From: "Alan T. DeKok" <aland@freeradius.org>
+Date: Wed, 20 Nov 2019 08:30:42 -0500
+Subject: [PATCH] home_server may be NULL if proxying fails
+
+---
+ src/main/process.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/main/process.c b/src/main/process.c
+index 78c6d8a9e5..c8b3af24e2 100644
+--- a/src/main/process.c
++++ b/src/main/process.c
+@@ -1642,7 +1642,8 @@ static void request_running(REQUEST *request, int action)
+ * handler.
+ */
+ if (request_proxy(request) < 0) {
+- if (request->home_server && request->home_server->server) goto req_finished;
++ if (!request->home_server ||
++ (request->home_server && request->home_server->server)) goto req_finished;
+
+ (void) setup_post_proxy_fail(request);
+ process_proxy_reply(request, NULL);