Blame SOURCES/libcgroup-0.41-CVE-2018-14348.patch

1c5b3f
From 9ed289ca9c792f525cf54e694b1b641300c000e6 Mon Sep 17 00:00:00 2001
1c5b3f
From: Michal Hocko <mhocko@suse.com>
1c5b3f
Date: Wed, 18 Jul 2018 11:24:29 +0200
1c5b3f
Subject: [PATCH] cgrulesengd: remove umask(0)
1c5b3f
1c5b3f
One of our partners has noticed that cgred daemon is creating a log file
1c5b3f
(/var/log/cgred) with too wide permissions (0666) and that is seen as
1c5b3f
a security bug because an untrusted user can write to otherwise
1c5b3f
restricted area. CVE-2018-14348 has been assigned to this issue.
1c5b3f
1c5b3f
Signed-off-by: Michal Hocko <mhocko@suse.com>
1c5b3f
Acked-by: Balbir Singh <bsingharora@gmail.com>
1c5b3f
---
1c5b3f
 src/daemon/cgrulesengd.c | 3 ---
1c5b3f
 1 file changed, 3 deletions(-)
1c5b3f
1c5b3f
diff --git a/src/daemon/cgrulesengd.c b/src/daemon/cgrulesengd.c
1c5b3f
index 170837a..41aadd4 100644
1c5b3f
--- a/src/daemon/cgrulesengd.c
1c5b3f
+++ b/src/daemon/cgrulesengd.c
1c5b3f
@@ -885,9 +885,6 @@ int cgre_start_daemon(const char *logp, const int logf,
1c5b3f
 		} else if (pid > 0) {
1c5b3f
 			exit(EXIT_SUCCESS);
1c5b3f
 		}
1c5b3f
-
1c5b3f
-		/* Change the file mode mask. */
1c5b3f
-		umask(0);
1c5b3f
 	} else {
1c5b3f
 		flog(LOG_DEBUG, "Not using daemon mode\n");
1c5b3f
 		pid = getpid();
1c5b3f
-- 
1c5b3f
2.17.1
1c5b3f