Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
.New SELinux types enable services to run confined
This update introduces new SELinux types that enable the following services to run as confined services in SELinux enforcing mode instead of running in the `unconfined_service_t` domain:
* `lldpd` now runs as `lldpad_t`
* `rrdcached` now runs as `rrdcached_t`
* `stratisd` now runs as `stratisd_t`
* `timedatex` now runs as `timedatex_t`
Description of problem:
* the service is shipped but it is not confined
Version-Release number of selected component (if applicable):
selinux-policy-3.14.3-9.el8.noarch
selinux-policy-targeted-3.14.3-9.el8.noarch
timedatex-0.5-3.el8.x86_64
How reproducible:
* always
Steps to Reproduce:
1. get a RHEL-8.1 machine (targeted policy is active)
# service timedatex status
Redirecting to /bin/systemctl status timedatex.service
● timedatex.service - System clock and RTC settings service
Loaded: loaded (/usr/lib/systemd/system/timedatex.service; enabled; vendor preset: enabled)
Active: inactive (dead)
# service timedatex start
Redirecting to /bin/systemctl start timedatex.service
# service timedatex status
Redirecting to /bin/systemctl status timedatex.service
● timedatex.service - System clock and RTC settings service
Loaded: loaded (/usr/lib/systemd/system/timedatex.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2019-07-16 03:34:42 EDT; 1s ago
Main PID: 1702 (timedatex)
Tasks: 4 (limit: 11518)
Memory: 1.3M
CGroup: /system.slice/timedatex.service
└─1702 /usr/sbin/timedatex
Jul 16 03:34:42 intentionally-removed systemd[1]: ...
Jul 16 03:34:42 intentionally-removed systemd[1]: ...
Hint: Some lines were ellipsized, use -l to show in full.
# ps -efZ | grep time
system_u:system_r:unconfined_service_t:s0 root 1702 1 0 03:34 ? 00:00:00 /usr/sbin/timedatex
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 root 1718 1241 0 03:34 pts/0 00:00:00 grep --color=auto time
#
Actual results:
* the timedatex service is not confined
Expected results:
* the timedatex service is confined
During the same session we prepared the following policy module, which solves the issue:
# cat mypolicy.te
policy_module(mypolicy, 1.0)
require {
type timedatex_t;
type systemd_timedated_unit_file_t;
class service status;
}
#============= timedatex_t ==============
allow timedatex_t systemd_timedated_unit_file_t:service status;
chronyd_systemctl(timedatex_t)
init_status(timedatex_t)
#
No SELinux denials appear after loading this policy module.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2020:1773
Description of problem: * the service is shipped but it is not confined Version-Release number of selected component (if applicable): selinux-policy-3.14.3-9.el8.noarch selinux-policy-targeted-3.14.3-9.el8.noarch timedatex-0.5-3.el8.x86_64 How reproducible: * always Steps to Reproduce: 1. get a RHEL-8.1 machine (targeted policy is active) # service timedatex status Redirecting to /bin/systemctl status timedatex.service ● timedatex.service - System clock and RTC settings service Loaded: loaded (/usr/lib/systemd/system/timedatex.service; enabled; vendor preset: enabled) Active: inactive (dead) # service timedatex start Redirecting to /bin/systemctl start timedatex.service # service timedatex status Redirecting to /bin/systemctl status timedatex.service ● timedatex.service - System clock and RTC settings service Loaded: loaded (/usr/lib/systemd/system/timedatex.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2019-07-16 03:34:42 EDT; 1s ago Main PID: 1702 (timedatex) Tasks: 4 (limit: 11518) Memory: 1.3M CGroup: /system.slice/timedatex.service └─1702 /usr/sbin/timedatex Jul 16 03:34:42 intentionally-removed systemd[1]: ... Jul 16 03:34:42 intentionally-removed systemd[1]: ... Hint: Some lines were ellipsized, use -l to show in full. # ps -efZ | grep time system_u:system_r:unconfined_service_t:s0 root 1702 1 0 03:34 ? 00:00:00 /usr/sbin/timedatex unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 root 1718 1241 0 03:34 pts/0 00:00:00 grep --color=auto time # Actual results: * the timedatex service is not confined Expected results: * the timedatex service is confined