From d581b812d61ea5ee6a267afe9ae28c0808fc8aa4 Mon Sep 17 00:00:00 2001 From: Stephen Smalley <sds@tycho.nsa.gov> Date: Mon, 24 Feb 2014 13:00:59 -0500 Subject: [PATCH] Remove fsetid from netd. fsetid checks are triggered by chmod on a directory or file owned by a group other than one of the groups assigned to the current process to see if the setgid bit should be cleared, regardless of whether the setgid bit was even set. We do not appear to truly need this capability for netd to operate, so remove it. Potential dontaudit candidate. Change-Id: I5ab4fbaaa056dcd1c7e60ec28632e7bc06f826bf Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov> --- netd.te | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/netd.te b/netd.te index f8c9ffbbc..fb54bde92 100644 --- a/netd.te +++ b/netd.te @@ -5,7 +5,16 @@ type netd_exec, exec_type, file_type; init_daemon_domain(netd) net_domain(netd) -allow netd self:capability { net_admin net_raw kill fsetid }; +allow netd self:capability { net_admin net_raw kill }; +# Note: fsetid is deliberately not included above. fsetid checks are +# triggered by chmod on a directory or file owned by a group other +# than one of the groups assigned to the current process to see if +# the setgid bit should be cleared, regardless of whether the setgid +# bit was even set. We do not appear to truly need this capability +# for netd to operate. Uncomment the dontaudit rule below after +# sufficient testing of the fsetid removal. +# dontaudit netd self:capability fsetid; + allow netd self:netlink_kobject_uevent_socket *; allow netd self:netlink_route_socket *; allow netd self:netlink_nflog_socket *; -- GitLab