Bug 978903

Summary: SELinux is preventing /usr/bin/loginctl from 'search' accesses on the directory /sys/fs/cgroup.
Product: [Fedora] Fedora Reporter: Michal Nowak <mnowak>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:c5adaf619eea7bc3c9cc88dbe0d0ac3d140eb1d3c73e86a02904a6f01b665b00
Fixed In Version: selinux-policy-3.12.1-59.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-07 01:32:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Nowak 2013-06-27 09:51:37 UTC
Description of problem:
SELinux is preventing /usr/bin/loginctl from 'search' accesses on the directory /sys/fs/cgroup.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that loginctl should be allowed search access on the cgroup directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep systemd-loginct /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:apmd_t:s0
Target Context                system_u:object_r:cgroup_t:s0
Target Objects                /sys/fs/cgroup [ dir ]
Source                        systemd-loginct
Source Path                   /usr/bin/loginctl
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-204-8.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-54.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.6-301.fc19.x86_64 #1 SMP Mon
                              Jun 17 14:26:26 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-06-26 23:11:02 CEST
Last Seen                     2013-06-26 23:11:02 CEST
Local ID                      96844ecb-db16-455b-b5f5-f5cd203c3206

Raw Audit Messages
type=AVC msg=audit(1372281062.656:736): avc:  denied  { search } for  pid=18214 comm="systemd-loginct" name="/" dev="tmpfs" ino=1201 scontext=system_u:system_r:apmd_t:s0 tcontext=system_u:object_r:cgroup_t:s0 tclass=dir


type=SYSCALL msg=audit(1372281062.656:736): arch=x86_64 syscall=openat success=no exit=EACCES a0=ffffffffffffff9c a1=7fbff4510140 a2=90800 a3=0 items=0 ppid=18209 pid=18214 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=systemd-loginct exe=/usr/bin/loginctl subj=system_u:system_r:apmd_t:s0 key=(null)

Hash: systemd-loginct,apmd_t,cgroup_t,dir,search

Additional info:
reporter:       libreport-2.1.5
hashmarkername: setroubleshoot
kernel:         3.9.6-301.fc19.x86_64
type:           libreport

Comment 1 Daniel Walsh 2013-06-27 20:01:36 UTC
491e17b17a0090c311d1a44ab9cc752023671fe0 fixes this in git.

Comment 2 Fedora Update System 2013-07-03 19:49:27 UTC
selinux-policy-3.12.1-59.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-59.fc19

Comment 3 Fedora Update System 2013-07-05 02:13:09 UTC
Package selinux-policy-3.12.1-59.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.12.1-59.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-12373/selinux-policy-3.12.1-59.fc19
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2013-07-07 01:32:24 UTC
selinux-policy-3.12.1-59.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.