diff --git a/SOURCES/libcgroup-0.41-CVE-2018-14348.patch b/SOURCES/libcgroup-0.41-CVE-2018-14348.patch new file mode 100644 index 0000000..2eb9d17 --- /dev/null +++ b/SOURCES/libcgroup-0.41-CVE-2018-14348.patch @@ -0,0 +1,33 @@ +From 513d6c4555ad3e925ba1463ec5f9f9b45453fc10 Mon Sep 17 00:00:00 2001 +From: Michal Hocko +Date: Wed, 18 Jul 2018 11:24:29 +0200 +Subject: [PATCH] cgrulesengd: remove umask(0) + +One of our partners has noticed that cgred daemon is creating a log file +(/var/log/cgred) with too wide permissions (0666) and that is seen as +a security bug because an untrusted user can write to otherwise +restricted area. CVE-2018-14348 has been assigned to this issue. + +Signed-off-by: Michal Hocko +Acked-by: Balbir Singh +--- + src/daemon/cgrulesengd.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/src/daemon/cgrulesengd.c b/src/daemon/cgrulesengd.c +index d959eff..ff6187a 100644 +--- a/src/daemon/cgrulesengd.c ++++ b/src/daemon/cgrulesengd.c +@@ -889,9 +889,6 @@ int cgre_start_daemon(const char *logp, const int logf, + } else if (pid > 0) { + exit(EXIT_SUCCESS); + } +- +- /* Change the file mode mask. */ +- umask(0); + } else { + flog(LOG_DEBUG, "Not using daemon mode\n"); + pid = getpid(); +-- +2.17.2 + diff --git a/SPECS/libcgroup.spec b/SPECS/libcgroup.spec index 06411e8..0c55442 100644 --- a/SPECS/libcgroup.spec +++ b/SPECS/libcgroup.spec @@ -5,7 +5,7 @@ Summary: Library to control and monitor control groups Name: libcgroup Version: 0.41 -Release: 20%{?dist} +Release: 21%{?dist} License: LGPLv2+ Group: Development/Libraries URL: http://libcg.sourceforge.net/ @@ -45,6 +45,8 @@ Patch19: libcgroup-0.41-api.c-tasks-file-warning.patch Patch20: libcgroup-0.41-cgrules.conf.5-extend-controllers-description.patch # resolves #1568354 Patch21: libcgroup-0.41-change-cgroup-of-every-thread.patch +# resolves: #1612122 +Patch22: libcgroup-0.41-CVE-2018-14348.patch BuildRequires: byacc, coreutils, flex, pam-devel, systemd Requires(pre): shadow-utils @@ -110,6 +112,7 @@ provide scripts to manage that configuration. %patch19 -p1 %patch20 -p1 %patch21 -p1 +%patch22 -p1 %build %configure --enable-pam-module-dir=%{_libdir}/security \ @@ -230,6 +233,10 @@ fi %{_libdir}/pkgconfig/libcgroup.pc %changelog +* Thu Dec 06 2018 Nikola Forró - 0.41-21 +- fix CVE-2018-14348 + resolves: #1612122 + * Wed Sep 05 2018 Nikola Forró - 0.41-20 - always move all tasks of a process to a cgroup related: #1568354