Bug 975702 - SELinux is preventing /usr/lib/systemd/systemd-logind from write access on the directory cpu,cpuacct.
SELinux is preventing /usr/lib/systemd/systemd-logind from write access on th...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-06-19 03:31 EDT by Frank Murphy
Modified: 2013-07-24 20:40 EDT (History)
4 users (show)

See Also:
Fixed In Version: selinux-policy-3.11.1-98.fc18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-07-24 20:40:44 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Frank Murphy 2013-06-19 03:31:15 EDT
Description of problem:

found 1 alerts in /var/log/audit/audit.log

SELinux is preventing /usr/lib/systemd/systemd-logind from write access on the directory cpu,cpuacct.

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

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

Additional Information:
Source Context                system_u:system_r:systemd_logind_t:s0
Target Context                system_u:object_r:tmpfs_t:s0
Target Objects                cpu,cpuacct [ dir ]
Source                        systemd-logind
Source Path                   /usr/lib/systemd/systemd-logind
Port                          <Unknown>
Host                          <Unknown>
Source RPM Packages           systemd-201-2.fc18.7.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-97.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     frank01.frankly3d.home
Platform                      Linux frank01.frankly3d.home 3.9.6-200.fc18.x86_64
                              #1 SMP Thu Jun 13 18:56:55 UTC 2013 x86_64 x86_64
Alert Count                   17
First Seen                    2013-06-17 19:05:01 IST
Last Seen                     2013-06-18 03:00:01 IST
Local ID                      b3405d46-5e47-4291-8a21-172c8f79be18

Raw Audit Messages
type=AVC msg=audit(1371520801.775:5026): avc:  denied  { write } for  pid=1214 comm="systemd-logind" name="cpu,cpuacct" dev="tmpfs" ino=6646 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:object_r:tmpfs_t:s0 tclass=dir

type=SYSCALL msg=audit(1371520801.775:5026): arch=x86_64 syscall=open success=no exit=EACCES a0=7fce2fbd67a0 a1=80241 a2=1b6 a3=238 items=0 ppid=1 pid=1214 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=systemd-logind exe=/usr/lib/systemd/systemd-logind subj=system_u:system_r:systemd_logind_t:s0 key=(null)

Hash: systemd-logind,systemd_logind_t,tmpfs_t,dir,write


#============= systemd_logind_t ==============
allow systemd_logind_t tmpfs_t:dir write;

audit2allow -R
require {
	type systemd_logind_t;

#============= systemd_logind_t ==============
Comment 1 Daniel Walsh 2013-06-19 16:26:33 EDT
Any idea where this is happening?  Looks like some kind of cgroup configuration?
Comment 2 Frank Murphy 2013-06-21 03:34:18 EDT
I have no idea, where it comes from. Guessing it was some systemd crossed wire.
Comment 3 Daniel Walsh 2013-06-21 09:16:04 EDT
Changed default labels for /sys/fs/cgroup to cgroup_t for now

da0155bfdc61b578f3b999037a9686ed2f212a96 in git.
Comment 4 Miroslav Grepl 2013-06-24 06:17:44 EDT
Back ported.
Comment 5 Fedora Update System 2013-06-27 09:36:42 EDT
selinux-policy-3.11.1-98.fc18 has been submitted as an update for Fedora 18.
Comment 6 Fedora Update System 2013-06-28 02:10:37 EDT
Package selinux-policy-3.11.1-98.fc18:
* should fix your issue,
* was pushed to the Fedora 18 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.11.1-98.fc18'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 7 Fedora Update System 2013-07-24 20:40:44 EDT
selinux-policy-3.11.1-98.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

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