Red Hat Bugzilla – Bug 1057612
systemd slice systemd-logind : tclass=system perm=start - incorrect checking
Last modified: 2015-06-29 20:52:18 EDT
Description of problem: systemd perfoms incorrect SeLinux context checking: [ 14.778999] systemd[1]: Got D-Bus request: org.freedesktop.systemd1.Manager.StartUnit() on /org/freedesktop/systemd1 [ 14.781936] systemd[1]: SELinux access check scon=system_u:system_r:systemd_logind_t:s0 tcon=system_u:system_r:init_t:s0 tclass=system perm=start path=(null) cmdline=(null): 0 [ 14.781944] systemd[1]: Trying to enqueue job user-994.slice/start/fail [ 14.781970] systemd[1]: Installed new job user-994.slice/start as 424 [ 14.781974] systemd[1]: Enqueued job user-994.slice/start as 424 [ 14.782023] systemd[1]: Starting user-994.slice. [ 14.782189] systemd[1]: user-994.slice changed dead -> active [ 14.782194] systemd[1]: Job user-994.slice/start finished, result=done [ 14.782293] systemd[1]: Created slice user-994.slice. # rpm -q systemd systemd-208-9.fc20.x86_64 To reproduce: # cat /etc/systemd/system.conf | grep -Ei 'kmsg|debug' LogLevel=debug LogTarget=kmsg # seinfo -csystem -x system status module_request reboot disable enable undefined ipc_info syslog_read halt reload syslog_console syslog_mod class "system" doesn't have permission "start" Above check should return "DENIED".
Looks like this is fixed in selinux-policy-3.12.1-120.fc20
This is about "system" vs "service" class. We have allow systemd_logind_t init_t : service status ; allow systemd_domain init_t : service { start stop status reload } ; and allow systemd_logind_t init_t : system { halt reboot status undefined } ; But is has been fixed in RHEL7.
Ok why not just allow it for F20 for now and clean it up in F21.
Please point me the commit fixing this bug. I do not understand, why FC20 results in "ALLOW" for this action. It is unknown action "start" for "system" class. Why SeLinux results "ALLOW"? My system (ALT Linux distro) returns "DENIED". I don't understand this behaviour.
(In reply to Daniel Walsh from comment #1) > Looks like this is fixed in selinux-policy-3.12.1-120.fc20 Because there was a bug and we removed {start stop status reload} permissions for system class. I meant it had been fixed in systemd on RHEL7.
Why has it been changed to policy? It means I will need to add back {start stop status reload} for "system" class which is wrong.
Well, this is for session objects. I am not sure what other class you want me to use for that...
And do we have all el7 fixes? If I am OK we see "service" class on RHEL7.
This message is a reminder that Fedora 20 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 20. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '20'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 20 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.