mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-11-25 20:02:19 +00:00
fix(xcat-core): the policy omits three accesses an EL9 management node makes
The policy was measured on EL10. An enforcing AlmaLinux 9.8 management node running the same bundle logged 38 denials in xcat_t that the EL10 node did not log at all. The domain is permissive, so nothing failed, but each one has to be granted before the domain can enforce. Three causes, all of them EL9 running ISC DHCP where EL10 runs Kea: - omshell reads /proc/sys/net/ipv4/ip_local_port_range before it opens the OMAPI socket, which is 9 read, 9 open, 9 getattr on sysctl_net_t and 8 dir search. makedhcp runs omshell on every ISC backend. kernel_read_net_sysctls covers it. - makedhcp asks systemd to start and query dhcpd.service, whose unit carries dhcpd_unit_file_t. The Kea units carry systemd_unit_file_t, which the policy already grants, so EL10 recorded nothing. - copycds loop-mounts the install DVD, and mount asks the kernel for the iso9660 and loop modules. kernel_request_load_module covers it. The module compiles against the EL9 and the EL10 policy headers. selinux_file_contexts.t keeps its 224 checks on EL10. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
This commit is contained in:
+13
-1
@@ -4,7 +4,7 @@ gen_require(`
|
||||
type httpd_t, httpd_sys_script_t, tftpdir_t, ntop_port_t;
|
||||
type rsync_t, shadow_t;
|
||||
type useradd_t, groupadd_t, public_content_t;
|
||||
type named_zone_t, named_unit_file_t, systemd_unit_file_t;
|
||||
type named_zone_t, named_unit_file_t, systemd_unit_file_t, dhcpd_unit_file_t;
|
||||
type auditd_etc_t, selinux_config_t, ldconfig_cache_t, setfiles_t, tmp_t;
|
||||
type device_t;
|
||||
attribute file_type;
|
||||
@@ -259,6 +259,18 @@ allow xcat_t named_unit_file_t:service { start status stop reload enable disable
|
||||
# denial was recorded for either: the audit window was empty while makedhcp
|
||||
# still reported "Failed to enable kea-dhcp-ddns".
|
||||
allow xcat_t systemd_unit_file_t:service { start status stop reload enable disable };
|
||||
# EL9 and earlier run ISC dhcpd, so makedhcp asks systemd for dhcpd.service.
|
||||
# EL10 runs Kea, whose units carry systemd_unit_file_t, which is why the EL10
|
||||
# measurement showed no denial for this one.
|
||||
allow xcat_t dhcpd_unit_file_t:service { start status stop reload enable disable };
|
||||
|
||||
# omshell reads /proc/sys/net/ipv4/ip_local_port_range before it opens the OMAPI
|
||||
# socket. makedhcp runs it on every ISC backend.
|
||||
kernel_read_net_sysctls(xcat_t)
|
||||
|
||||
# copycds loop-mounts the install DVD, and mount asks the kernel for the
|
||||
# iso9660 and loop modules.
|
||||
kernel_request_load_module(xcat_t)
|
||||
|
||||
# xcatd keeps its credentials under /etc/xcat and its socket under /run/xcat.
|
||||
manage_dirs_pattern(xcat_t, cert_t, cert_t)
|
||||
|
||||
Reference in New Issue
Block a user