commit:     ce92e2974b7ba4eb073097e4a192779147db3b39
Author:     Dave Sugar <dsugar <AT> tresys <DOT> com>
AuthorDate: Wed Jun  6 14:25:06 2018 +0000
Commit:     Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Fri Jun  8 09:21:01 2018 +0000
URL:        
https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=ce92e297

Allow systemd-resolved to read sysctl

type=AVC msg=audit(1527698300.007:150): avc:  denied  { search } for  pid=1193 
comm="systemd-resolve" name="net" dev="proc" ino=8515 
scontext=system_u:system_r:systemd_resolved_t:s0 
tcontext=system_u:object_r:sysctl_net_t:s0 tclass=dir
type=AVC msg=audit(1527698300.007:150): avc:  denied  { read } for  pid=1193 
comm="systemd-resolve" name="disable_ipv6" dev="proc" ino=7988 
scontext=system_u:system_r:systemd_resolved_t:s0 
tcontext=system_u:object_r:sysctl_net_t:s0 tclass=file
type=AVC msg=audit(1527698300.007:150): avc:  denied  { open } for  pid=1193 
comm="systemd-resolve" path="/proc/sys/net/ipv6/conf/all/disable_ipv6" 
dev="proc" ino=7988 scontext=system_u:system_r:systemd_resolved_t:s0 
tcontext=system_u:object_r:sysctl_net_t:s0 tclass=file
type=AVC msg=audit(1527698300.007:151): avc:  denied  { getattr } for  pid=1193 
comm="systemd-resolve" path="/proc/sys/net/ipv6/conf/all/disable_ipv6" 
dev="proc" ino=7988 scontext=system_u:system_r:systemd_resolved_t:s0 
tcontext=system_u:object_r:sysctl_net_t:s0 tclass=file

type=AVC msg=audit(1527698300.006:148): avc:  denied  { read } for  pid=1193 
comm="systemd-resolve" name="disable" dev="sysfs" ino=2111 
scontext=system_u:system_r:systemd_resolved_t:s0 
tcontext=system_u:object_r:sysfs_t:s0 tclass=file
type=AVC msg=audit(1527698300.006:148): avc:  denied  { open } for  pid=1193 
comm="systemd-resolve" path="/sys/module/ipv6/parameters/disable" dev="sysfs" 
ino=2111 scontext=system_u:system_r:systemd_resolved_t:s0 
tcontext=system_u:object_r:sysfs_t:s0 tclass=file
type=AVC msg=audit(1527698300.007:149): avc:  denied  { getattr } for  pid=1193 
comm="systemd-resolve" path="/sys/module/ipv6/parameters/disable" dev="sysfs" 
ino=2111 scontext=system_u:system_r:systemd_resolved_t:s0 
tcontext=system_u:object_r:sysfs_t:s0 tclass=file

Signed-off-by: Dave Sugar <dsugar <AT> tresys.com>

 policy/modules/system/systemd.te | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te
index 0cf54f54..708b9f23 100644
--- a/policy/modules/system/systemd.te
+++ b/policy/modules/system/systemd.te
@@ -842,8 +842,11 @@ manage_dirs_pattern(systemd_resolved_t, 
systemd_resolved_var_run_t, systemd_reso
 manage_files_pattern(systemd_resolved_t, systemd_resolved_var_run_t, 
systemd_resolved_var_run_t)
 init_pid_filetrans(systemd_resolved_t, systemd_resolved_var_run_t, dir)
 
+dev_read_sysfs(systemd_resolved_t)
+
 kernel_read_crypto_sysctls(systemd_resolved_t)
 kernel_read_kernel_sysctls(systemd_resolved_t)
+kernel_read_net_sysctls(systemd_resolved_t)
 
 corenet_tcp_bind_generic_node(systemd_resolved_t)
 corenet_tcp_bind_llmnr_port(systemd_resolved_t)

Reply via email to