Bug 1317389 - SELinux complains when systemd reboots a system (again)
SELinux complains when systemd reboots a system (again)
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
24
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Miroslav Grepl
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-14 03:59 EDT by Stef Walter
Modified: 2017-08-08 09:07 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-08 09:07:31 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Stef Walter 2016-03-14 03:59:37 EDT
Description of problem:

Rebooting a system creates these SELinux audit errors.

audit: type=1400 audit(1457714082.876:319): avc: denied { create } for pid=1409 comm="systemd-user-se" name=".#nologinPFTMyq" scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:systemd_logind_var_run_t:s0 tclass=file permissive=1
audit: type=1400 audit(1457714082.876:319): avc: denied { write } for pid=1409 comm="systemd-user-se" path="/run/.#nologinPFTMyq" dev="tmpfs" ino=23392 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:systemd_logind_var_run_t:s0 tclass=file permissive=1
audit: type=1400 audit(1457714083.035:321): avc: denied { setattr } for pid=1409 comm="systemd-user-se" name=".#nologinPFTMyq" dev="tmpfs" ino=23392 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:systemd_logind_var_run_t:s0 tclass=file permissive=1
audit: type=1400 audit(1457714083.117:322): avc: denied { rename } for pid=1409 comm="systemd-user-se" name=".#nologinPFTMyq" dev="tmpfs" ino=23392 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:systemd_logind_var_run_t:s0 tclass=file permissive=1'

Version-Release number of selected component (if applicable):

systemd-229-5.fc24.x86_64
selinux-policy-targeted-3.13.1-176.fc24.noarch

Additional info:

This issue was found by the Cockpit integration tests.

Full journal dump, including the above AVC's:

https://fedorapeople.org/groups/cockpit/logs/pull-3910-d25d3740-verify-fedora-24/backup.NjtciR/TestShutdownRestart-testBasic-10.111.112.103-FAIL.log
Comment 1 Stef Walter 2016-03-14 04:06:10 EDT
Reproduce in Fedora 24 by rebooting the system with 'shutdown -r now'. After reboot I see this in the journal:

Mär 14 04:03:49 localhost.localdomain audit[1221]: AVC avc:  denied  { create } for  pid=1221 comm="systemd-user-se" name=".#nologinrlsAS6" scontext=system_u:system
Mär 14 04:03:49 localhost.localdomain audit[1221]: SYSCALL arch=c000003e syscall=2 success=no exit=-13 a0=5636b0b17240 a1=800c2 a2=180 a3=7ffcec25401d items=0 ppid=
Mär 14 04:03:49 localhost.localdomain audit: PROCTITLE proctitle=2F7573722F6C69622F73797374656D642F73797374656D642D757365722D73657373696F6E730073746F70
Mär 14 04:03:49 localhost.localdomain systemd-user-sessions[1221]: Failed to create /run/nologin: Permission denied
Comment 2 Stef Walter 2016-03-14 04:08:20 EDT
This issue has been fixed before in fedora-23 ... however systemd has changed recently and SELinux is lagging behind on the changes:

https://bugzilla.redhat.com/show_bug.cgi?id=1285019
Comment 3 Daniel Walsh 2016-03-14 08:53:34 EDT
init_t should be an unconfined domain, by default.
Comment 4 Lukas Vrabec 2016-03-15 13:33:50 EDT
I would say we need to create policy for systemd-sessions and make it as unconfined_domain to avoid problems around pam with this daemon.
Comment 5 Miroslav Grepl 2016-03-18 08:47:39 EDT
(In reply to Lukas Vrabec from comment #4)
> I would say we need to create policy for systemd-sessions and make it as
> unconfined_domain to avoid problems around pam with this daemon.

Which can cause really big issues with your system. I agree we should add a new policy and try to make it working correctly.
Comment 6 Fedora End Of Life 2017-07-25 16:19:17 EDT
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. 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 '24'.

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 24 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 7 Fedora End Of Life 2017-08-08 09:07:31 EDT
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 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.

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