From 39858a75287848a71c18d38ff63cf49d97beac14 Mon Sep 17 00:00:00 2001 From: Yi Zhao Date: Mon, 18 Oct 2021 14:56:45 +0800 Subject: [PATCH 1/2] rngd: fixes for rngd * allow rngd_t to read certificates * allow rngd_t to getsched/setsched Fixes: avc: denied { search } for pid=332 comm="rngd" name="ssl" dev="vda" ino=588 scontext=system_u:system_r:rngd_t tcontext=system_u:object_r:cert_t tclass=dir permissive=1 avc: denied { read } for pid=332 comm="rngd" name="openssl.cnf" dev="vda" ino=849 scontext=system_u:system_r:rngd_t tcontext=system_u:object_r:cert_t tclass=file permissive=1 avc: denied { open } for pid=332 comm="rngd" path="/etc/ssl/openssl.cnf" dev="vda" ino=849 scontext=system_u:system_r:rngd_t tcontext=system_u:object_r:cert_t tclass=file permissive=1 avc: denied { getattr } for pid=332 comm="rngd" path="/etc/ssl/openssl.cnf" dev="vda" ino=849 scontext=system_u:system_r:rngd_t tcontext=system_u:object_r:cert_t tclass=file permissive=1 avc: denied { getsched } for pid=370 comm="rngd" scontext=system_u:system_r:rngd_t tcontext=system_u:system_r:rngd_t tclass=process permissive=1 avc: denied { setsched } for pid=370 comm="rngd" scontext=system_u:system_r:rngd_t tcontext=system_u:system_r:rngd_t tclass=process permissive=1 Signed-off-by: Yi Zhao --- policy/modules/services/rngd.te | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/policy/modules/services/rngd.te b/policy/modules/services/rngd.te index 29dff4280..177199e87 100644 --- a/policy/modules/services/rngd.te +++ b/policy/modules/services/rngd.te @@ -21,7 +21,7 @@ files_runtime_file(rngd_runtime_t) # allow rngd_t self:capability { ipc_lock sys_admin }; -allow rngd_t self:process signal; +allow rngd_t self:process { setsched getsched signal }; allow rngd_t self:fifo_file rw_fifo_file_perms; allow rngd_t self:unix_stream_socket { accept listen }; @@ -41,3 +41,4 @@ files_read_etc_files(rngd_t) logging_send_syslog_msg(rngd_t) miscfiles_read_localization(rngd_t) +miscfiles_read_generic_certs(rngd_t) From 5a24f5940757e5215fa2c88e92926f194d14dabb Mon Sep 17 00:00:00 2001 From: Yi Zhao Date: Sun, 26 Sep 2021 13:56:36 +0800 Subject: [PATCH 2/2] dbus: allow dbus-daemon to map SELinux status page Fixes: avc: denied { map } for pid=328 comm="dbus-daemon" path="/sys/fs/selinux/status" dev="selinuxfs" ino=19 scontext=system_u:system_r:system_dbusd_t tcontext=system_u:object_r:security_t tclass=file permissive=0 Signed-off-by: Yi Zhao --- policy/modules/services/dbus.te | 1 + 1 file changed, 1 insertion(+) diff --git a/policy/modules/services/dbus.te b/policy/modules/services/dbus.te index 37cb04adc..2025becf5 100644 --- a/policy/modules/services/dbus.te +++ b/policy/modules/services/dbus.te @@ -129,6 +129,7 @@ mls_socket_read_to_clearance(system_dbusd_t) mls_dbus_recv_all_levels(system_dbusd_t) selinux_get_fs_mount(system_dbusd_t) +selinux_use_status_page(system_dbusd_t) selinux_validate_context(system_dbusd_t) selinux_compute_access_vector(system_dbusd_t) selinux_compute_create_context(system_dbusd_t)