aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2017-02-11 22:35:29 -0500
committerLeo Famulari <leo@famulari.name>2017-02-12 10:26:02 -0500
commitd6065945ff85f1ffea915fc9e22567731a318795 (patch)
treea127865a949726fef4b6d4f51b9d74ec644e3063 /gnu/packages/patches
parent6ea86d7ec38f8c23957d6cce9ec6528987953ef8 (diff)
downloadguix-d6065945ff85f1ffea915fc9e22567731a318795.tar
guix-d6065945ff85f1ffea915fc9e22567731a318795.tar.gz
gnu: screen: Fix CVE-2017-5618.
* gnu/packages/patches/screen-CVE-2017-5618.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/screen.scm (screen)[source]: Use it.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/screen-CVE-2017-5618.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/gnu/packages/patches/screen-CVE-2017-5618.patch b/gnu/packages/patches/screen-CVE-2017-5618.patch
new file mode 100644
index 0000000000..1b95e428c8
--- /dev/null
+++ b/gnu/packages/patches/screen-CVE-2017-5618.patch
@@ -0,0 +1,40 @@
+Fixes CVE-2017-5618 (privilege escalation via opening the logfile when
+screen is installed setuid root):
+
+https://savannah.gnu.org/bugs/?50142
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5618
+
+This patch reverts the upstream commit that introduced the bug:
+
+https://git.savannah.gnu.org/cgit/screen.git/commit/?id=5460f5d28c01a9a58e021eb1dffef2965e629d58
+
+From f55b0cc29a0ac2a1c54e8a5e886b7393edd4a76c Mon Sep 17 00:00:00 2001
+From: Leo Famulari <leo@famulari.name>
+Date: Sat, 11 Feb 2017 22:40:24 -0500
+Subject: [PATCH] Revert "adding permissions check for the logfile name"
+
+This reverts commit 5460f5d28c01a9a58e021eb1dffef2965e629d58.
+---
+ src/screen.c | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/src/screen.c b/src/screen.c
+index 64650e9..283c305 100644
+--- a/src/screen.c
++++ b/src/screen.c
+@@ -673,12 +673,6 @@ int main(int ac, char** av)
+ Panic(0, "-L: logfile name can not start with \"-\" symbol");
+ if (strlen(screenlogfile) > PATH_MAX)
+ Panic(0, "-L: logfile name too long. (max. %d char)", PATH_MAX);
+-
+- FILE *w_check;
+- if ((w_check = fopen(screenlogfile, "w")) == NULL)
+- Panic(0, "-L: logfile name access problem");
+- else
+- fclose(w_check);
+ }
+ nwin_options.Lflag = 1;
+ break;
+--
+2.11.1
+