Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1057612 - systemd slice systemd-logind : tclass=system perm=start - incorrect checking
Summary: systemd slice systemd-logind : tclass=system perm=start - incorrect checking
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 20
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2014-01-24 13:20 UTC by stanv
Modified: 2015-06-30 00:52 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-06-30 00:52:18 UTC

Attachments (Terms of Use)

Description stanv 2014-01-24 13:20:23 UTC
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
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

To reproduce:
# cat /etc/systemd/system.conf | grep -Ei 'kmsg|debug'

# seinfo -csystem -x

class "system" doesn't have permission "start"

Above check should return "DENIED".

Comment 1 Daniel Walsh 2014-01-24 16:29:26 UTC
Looks like this is fixed in selinux-policy-3.12.1-120.fc20

Comment 2 Miroslav Grepl 2014-01-24 16:37:55 UTC
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 } ;


  allow systemd_logind_t init_t : system { halt reboot status undefined } ;

But is has been fixed in RHEL7.

Comment 3 Daniel Walsh 2014-01-24 16:43:28 UTC
Ok why not just allow it for F20 for now and clean it up in F21.

Comment 4 stanv 2014-01-26 18:41:38 UTC
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.

Comment 5 Miroslav Grepl 2014-01-27 07:10:09 UTC
(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.

Comment 6 Miroslav Grepl 2014-01-28 07:40:10 UTC
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.

Comment 7 Lennart Poettering 2014-01-28 16:43:52 UTC
Well, this is for session objects. I am not sure what other class you want me to use for that...

Comment 8 Miroslav Grepl 2014-01-28 16:57:30 UTC
And do we have all el7 fixes? If I am OK we see "service" class on RHEL7.

Comment 9 Fedora End Of Life 2015-05-29 10:39:42 UTC
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.

Comment 10 Fedora End Of Life 2015-06-30 00:52:18 UTC
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

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.