| Summary: | selinux problems with staff_t systemd --user | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Robin Powell <rlpowell> |
| Component: | selinux-policy | Assignee: | Lukas Vrabec <lvrabec> |
| Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 25 | CC: | dominick.grift, dwalsh, lvrabec, mgrepl, plautrba, pmoore, ssekidde |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-12-12 10:55:04 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Robin Powell
2016-12-05 05:46:48 UTC
What's interesting to me is that this failure occurs even when setenforce 0. That is: with setenforce 0, systemd --user fails to actually work because it doesn't set up the dbus properly, and it appears to be selinux's fault. Maybe something else is causing the failure, though?, hard to tell. So I patched the above using audit2allow, and ran it again. This time it actually *succeeded*, so here's the AVCs from that run (with dontaudit off, and setenforce 0):
type=AVC msg=audit(1480917931.883:3563): avc: denied { wake_alarm } for pid=1016 comm="systemd-udevd" capability=35 scontext=system_u:system_r:udev_t:s0-s0:c0.c1023 tcont
ext=system_u:system_r:udev_t:s0-s0:c0.c1023 tclass=capability2 permissive=1
type=AVC msg=audit(1480917931.894:3564): avc: denied { rlimitinh } for pid=31004 comm="unix_chkpwd" scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:chkpwd_
t:s0 tclass=process permissive=1
type=AVC msg=audit(1480917931.894:3565): avc: denied { siginh } for pid=31004 comm="unix_chkpwd" scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:chkpwd_t:s
0 tclass=process permissive=1
type=AVC msg=audit(1480917931.894:3566): avc: denied { noatsecure } for pid=31004 comm="unix_chkpwd" scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:chkpwd
_t:s0 tclass=process permissive=1
type=AVC msg=audit(1480917931.959:3571): avc: denied { wake_alarm } for pid=1016 comm="systemd-udevd" capability=35 scontext=system_u:system_r:udev_t:s0-s0:c0.c1023 tcont
ext=system_u:system_r:udev_t:s0-s0:c0.c1023 tclass=capability2 permissive=1
type=AVC msg=audit(1480917931.960:3572): avc: denied { read write } for pid=30998 comm="systemd" path="socket:[352447]" dev="sockfs" ino=352447 scontext=staff_u:staff_r:st
aff_t:s0-s0:c0.c1023 tcontext=system_u:system_r:init_t:s0 tclass=unix_stream_socket permissive=1
type=AVC msg=audit(1480917931.960:3573): avc: denied { rlimitinh } for pid=30998 comm="systemd" scontext=system_u:system_r:init_t:s0 tcontext=staff_u:staff_r:staff_t:s0-s0
:c0.c1023 tclass=process permissive=1
type=AVC msg=audit(1480917931.960:3574): avc: denied { siginh } for pid=30998 comm="systemd" scontext=system_u:system_r:init_t:s0 tcontext=staff_u:staff_r:staff_t:s0-s0:c0
.c1023 tclass=process permissive=1
type=AVC msg=audit(1480917931.960:3575): avc: denied { read execute } for pid=30998 comm="systemd" path="/usr/lib/systemd/systemd" dev="vda2" ino=534955 scontext=staff_u:s
taff_r:staff_t:s0-s0:c0.c1023 tcontext=system_u:object_r:init_exec_t:s0 tclass=file permissive=1
type=AVC msg=audit(1480917931.968:3576): avc: denied { add_name } for pid=30998 comm="systemd" name="init.scope" scontext=staff_u:staff_r:staff_t:s0-s0:c0.c1023 tcontext=s
ystem_u:object_r:cgroup_t:s0 tclass=dir permissive=1
type=AVC msg=audit(1480917931.968:3577): avc: denied { create } for pid=30998 comm="systemd" name="init.scope" scontext=staff_u:staff_r:staff_t:s0-s0:c0.c1023 tcontext=sta
ff_u:object_r:cgroup_t:s0 tclass=dir permissive=1
type=AVC msg=audit(1480917931.968:3578): avc: denied { getattr } for pid=30998 comm="systemd" path="/sys/fs/cgroup/cpu" dev="tmpfs" ino=9880 scontext=staff_u:staff_r:staff_t:s0-s0:c0.c1023 tcontext=system_u:object_r:tmpfs_t:s0 tclass=lnk_file permissive=1
type=AVC msg=audit(1480917931.978:3579): avc: denied { read } for pid=30998 comm="systemd" name="mount" dev="tmpfs" ino=12299 scontext=staff_u:staff_r:staff_t:s0-s0:c0.c1023 tcontext=system_u:object_r:mount_var_run_t:s0 tclass=dir permissive=1
type=AVC msg=audit(1480917931.984:3580): avc: denied { read } for pid=30998 comm="systemd" name="cpu" dev="tmpfs" ino=9880 scontext=staff_u:staff_r:staff_t:s0-s0:c0.c1023 tcontext=system_u:object_r:tmpfs_t:s0 tclass=lnk_file permissive=1
type=AVC msg=audit(1480917931.985:3581): avc: denied { add_name } for pid=30998 comm="systemd" name="dbus.socket" scontext=staff_u:staff_r:staff_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cgroup_t:s0 tclass=dir permissive=1
type=AVC msg=audit(1480917933.711:3585): avc: denied { read write } for pid=1 comm="systemd" path="socket:[350620]" dev="sockfs" ino=350620 scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=unix_stream_socket permissive=1
type=AVC msg=audit(1480917933.792:3586): avc: denied { read write } for pid=1 comm="systemd" path="socket:[350622]" dev="sockfs" ino=350622 scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:kernel_t:s0-s0:c0.c1023 tclass=unix_stream_socket permissive=1
The module I added has this:
fs_delete_cgroup_dirs(staff_t)
init_ioctl_stream_sockets(staff_t)
FWIW, here's the full working module; I've not confirmed that everything in here is necessary, but the mount_var_run_t bit definitely is: policy_module(MYLOCAL_systemdbugs1401385,1.0.0) require { type staff_t; type mount_var_run_t; class dir { read }; } # systemd + staff_t -- https://bugzilla.redhat.com/show_bug.cgi?id=1401385 fs_delete_cgroup_dirs(staff_t) init_ioctl_stream_sockets(staff_t) fs_manage_cgroup_dirs(staff_t) fs_read_tmpfs_symlinks(staff_t) init_exec(staff_t) init_rw_stream_sockets(staff_t) allow staff_t mount_var_run_t:dir read; This message is a reminder that Fedora 25 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 25. 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 '25'. 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 25 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 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 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. |