aboutgitcodebugslistschat
path: root/contrib/selinux/pasta.te
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2023-08-15 19:50:48 +0200
committerStefano Brivio <sbrivio@redhat.com>2023-08-18 18:47:53 +0200
commit977652155d546fbc3cef27928f889d3cf019420a (patch)
tree30a4922aea549de0a0304b935438c124828e1982 /contrib/selinux/pasta.te
parent56b8633a6b23a81496401c8bbbcc04b25ebf19b2 (diff)
downloadpasst-977652155d546fbc3cef27928f889d3cf019420a.tar
passt-977652155d546fbc3cef27928f889d3cf019420a.tar.gz
passt-977652155d546fbc3cef27928f889d3cf019420a.tar.bz2
passt-977652155d546fbc3cef27928f889d3cf019420a.tar.lz
passt-977652155d546fbc3cef27928f889d3cf019420a.tar.xz
passt-977652155d546fbc3cef27928f889d3cf019420a.tar.zst
passt-977652155d546fbc3cef27928f889d3cf019420a.zip
selinux: Add rules for sysctl and /proc/net accesses
That's what we actually need to check networking-related sysctls, to scan for bound ports, and to manipulate bits of network configuration inside pasta's target namespaces. Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Acked-by: Richard W.M. Jones <rjones@redhat.com>
Diffstat (limited to 'contrib/selinux/pasta.te')
-rw-r--r--contrib/selinux/pasta.te3
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/selinux/pasta.te b/contrib/selinux/pasta.te
index ee82b0f..86d9456 100644
--- a/contrib/selinux/pasta.te
+++ b/contrib/selinux/pasta.te
@@ -133,6 +133,7 @@ allow syslogd_t self:cap_userns sys_ptrace;
allow pasta_t proc_net_t:file { open read };
allow pasta_t net_conf_t:file { open read };
allow pasta_t self:netlink_route_socket { bind create nlmsg_read nlmsg_write setopt read write };
+kernel_search_network_sysctl(pasta_t)
allow pasta_t tmp_t:sock_file { create unlink write };
@@ -186,4 +187,6 @@ allow pasta_t sysctl_net_t:dir search;
allow pasta_t sysctl_net_t:file { open write };
allow pasta_t kernel_t:system module_request;
+allow pasta_t net_conf_t:lnk_file read;
+allow pasta_t proc_net_t:lnk_file read;