Bug 1135325

Summary: SELinux is preventing /usr/lib/systemd/systemd from 'create' accesses on the directory .
Product: [Fedora] Fedora Reporter: Moez Roy <moez.roy>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: dominick.grift, dwalsh, lvrabec, mgrepl, moez.roy
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:5381e5213edf6790f5beca41eff8380f679d49bc327ffc57097b48884a6e0673
Fixed In Version: selinux-policy-3.12.1-197.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-10 00:55:38 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 Moez Roy 2014-08-29 05:25:22 UTC
Description of problem:
SELinux is preventing /usr/lib/systemd/systemd from 'create' accesses on the directory .

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

If you believe that systemd should be allowed create access on the  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 /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:init_t:s0
Target Context                system_u:object_r:gconf_home_t:s0
Target Objects                 [ dir ]
Source                        systemd
Source Path                   /usr/lib/systemd/systemd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-208-21.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-182.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.15.10-200.fc20.x86_64 #1 SMP Thu
                              Aug 14 15:39:24 UTC 2014 x86_64 x86_64
Alert Count                   1
First Seen                    2014-08-28 22:23:49 PDT
Last Seen                     2014-08-28 22:23:49 PDT
Local ID                      f1f0334f-c840-4e29-9a77-d43b1892b529

Raw Audit Messages
type=AVC msg=audit(1409289829.842:534): avc:  denied  { create } for  pid=13701 comm="systemd" name=".local" scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:gconf_home_t:s0 tclass=dir


type=SYSCALL msg=audit(1409289829.842:534): arch=x86_64 syscall=mkdir success=no exit=EACCES a0=7fff02d69f10 a1=1ff a2=11 a3=7f791b6e4d40 items=0 ppid=1 pid=13701 auid=4294967295 uid=1002 gid=1002 euid=1002 suid=1002 fsuid=1002 egid=1002 sgid=1002 fsgid=1002 tty=(none) ses=4294967295 comm=systemd exe=/usr/lib/systemd/systemd subj=system_u:system_r:init_t:s0 key=(null)

Hash: systemd,init_t,gconf_home_t,dir,create

Additional info:
reporter:       libreport-2.2.3
hashmarkername: setroubleshoot
kernel:         3.15.10-200.fc20.x86_64
type:           libreport

Potential duplicate: bug 1068821

Comment 1 Lukas Vrabec 2014-09-03 13:44:29 UTC
#============= init_t ==============

#!!!! This avc is allowed in the current policy
allow init_t gconf_home_t:dir create;

$ rpm -q selinux-policy
selinux-policy-3.12.1-182.fc20.noarch

Comment 2 Moez Roy 2014-09-04 05:16:31 UTC
I already have the current release. Why did I get this AVC?

=================


SELinux is preventing /usr/lib/systemd/systemd from 'create' accesses on the directory .

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

If you believe that systemd should be allowed create access on the  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 /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:init_t:s0
Target Context                system_u:object_r:gconf_home_t:s0
Target Objects                 [ dir ]
Source                        systemd
Source Path                   /usr/lib/systemd/systemd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-208-21.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-182.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.15.10-201.fc20.x86_64 #1 SMP Wed
                              Aug 27 21:10:06 UTC 2014 x86_64 x86_64
Alert Count                   2
First Seen                    2014-08-28 22:23:49 PDT
Last Seen                     2014-09-03 21:53:42 PDT
Local ID                      f1f0334f-c840-4e29-9a77-d43b1892b529

Raw Audit Messages
type=AVC msg=audit(1409806422.424:379): avc:  denied  { create } for  pid=2462 comm="systemd" name=".local" scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:gconf_home_t:s0 tclass=dir


type=SYSCALL msg=audit(1409806422.424:379): arch=x86_64 syscall=mkdir success=no exit=EACCES a0=7fff00502440 a1=1ff a2=f a3=7f59813edd40 items=0 ppid=1 pid=2462 auid=4294967295 uid=1003 gid=1003 euid=1003 suid=1003 fsuid=1003 egid=1003 sgid=1003 fsgid=1003 tty=(none) ses=4294967295 comm=systemd exe=/usr/lib/systemd/systemd subj=system_u:system_r:init_t:s0 key=(null)

Hash: systemd,init_t,gconf_home_t,dir,create


=============


----
time->Wed Sep  3 11:13:07 2014
type=PROCTITLE msg=audit(1409767987.269:716): proctitle=2F7573722F6C69622F73797374656D642F73797374656D64002D2D75736572
type=SYSCALL msg=audit(1409767987.269:716): arch=c000003e syscall=83 success=no exit=-13 a0=7fff20327ea0 a1=1ff a2=f a3=7f2785aacd40 items=0 ppid=1 pid=10962 auid=4294967295 uid=1002 gid=1002 euid=1002 suid=1002 fsuid=1002 egid=1002 sgid=1002 fsgid=1002 tty=(none) ses=4294967295 comm="systemd" exe="/usr/lib/systemd/systemd" subj=system_u:system_r:init_t:s0 key=(null)
type=AVC msg=audit(1409767987.269:716): avc:  denied  { create } for  pid=10962 comm="systemd" name=".local" scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:gconf_home_t:s0 tclass=dir
----
time->Wed Sep  3 12:27:31 2014
type=PROCTITLE msg=audit(1409772451.959:37): proctitle=2F7573722F62696E2F707974686F6E002D4573002F7573722F7362696E2F6669726577616C6C64002D2D6E6F666F726B002D2D6E6F706964
type=SYSCALL msg=audit(1409772451.959:37): arch=c000003e syscall=2 success=no exit=-13 a0=1f38220 a1=0 a2=1b6 a3=1 items=0 ppid=1 pid=2341 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="firewalld" exe="/usr/bin/python2.7" subj=system_u:system_r:firewalld_t:s0 key=(null)
type=AVC msg=audit(1409772451.959:37): avc:  denied  { read } for  pid=2341 comm="firewalld" name="__init__.pyc" dev="dm-0" ino=593192 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:lib_t:s0 tclass=file
----
time->Wed Sep  3 12:27:31 2014
type=PROCTITLE msg=audit(1409772451.959:38): proctitle=2F7573722F62696E2F707974686F6E002D4573002F7573722F7362696E2F6669726577616C6C64002D2D6E6F666F726B002D2D6E6F706964
type=SYSCALL msg=audit(1409772451.959:38): arch=c000003e syscall=87 success=no exit=-13 a0=1f38220 a1=1cd08 a2=81a4 a3=7fff4700cc90 items=0 ppid=1 pid=2341 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="firewalld" exe="/usr/bin/python2.7" subj=system_u:system_r:firewalld_t:s0 key=(null)
type=AVC msg=audit(1409772451.959:38): avc:  denied  { write } for  pid=2341 comm="firewalld" name="parsers" dev="dm-0" ino=25523 scontext=system_u:system_r:firewalld_t:s0 tcontext=system_u:object_r:lib_t:s0 tclass=dir
----
time->Wed Sep  3 12:27:33 2014
type=AVC msg=audit(1409772453.457:39): avc:  denied  { read } for  pid=2009 comm="systemd-readahe" name="six.pyc" dev="dm-0" ino=862602 scontext=system_u:system_r:readahead_t:s0 tcontext=system_u:object_r:lib_t:s0 tclass=file
----
time->Wed Sep  3 12:32:37 2014
type=PROCTITLE msg=audit(1409772757.744:420): proctitle=2F7573722F6C69622F73797374656D642F73797374656D64002D2D75736572
type=SYSCALL msg=audit(1409772757.744:420): arch=c000003e syscall=83 success=no exit=-13 a0=7fff02c65850 a1=1ff a2=f a3=7f6f9f506d40 items=0 ppid=1 pid=3728 auid=4294967295 uid=1003 gid=1003 euid=1003 suid=1003 fsuid=1003 egid=1003 sgid=1003 fsgid=1003 tty=(none) ses=4294967295 comm="systemd" exe="/usr/lib/systemd/systemd" subj=system_u:system_r:init_t:s0 key=(null)
type=AVC msg=audit(1409772757.744:420): avc:  denied  { create } for  pid=3728 comm="systemd" name=".local" scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:gconf_home_t:s0 tclass=dir
----
time->Wed Sep  3 14:59:03 2014
type=PROCTITLE msg=audit(1409781543.271:516): proctitle=2F6C69622F756465762F69706F642D7365742D696E666F002F6465762F7364643100330033
type=SYSCALL msg=audit(1409781543.271:516): arch=c000003e syscall=165 success=no exit=-13 a0=7fff72479908 a1=20b2060 a2=7fff72479ab5 a3=0 items=0 ppid=6453 pid=6478 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="ipod-set-info" exe="/usr/lib/udev/ipod-set-info" subj=system_u:system_r:udev_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1409781543.271:516): avc:  denied  { mount } for  pid=6478 comm="ipod-set-info" name="/" dev="sdd1" ino=1 scontext=system_u:system_r:udev_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dosfs_t:s0 tclass=filesystem
----
time->Wed Sep  3 15:15:09 2014
type=PROCTITLE msg=audit(1409782509.034:532): proctitle=2F6C69622F756465762F69706F642D7365742D696E666F002F6465762F7364643100330034
type=SYSCALL msg=audit(1409782509.034:532): arch=c000003e syscall=165 success=no exit=-13 a0=7fff0d7d0906 a1=202d390 a2=7fff0d7d0ab3 a3=0 items=0 ppid=7023 pid=7047 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="ipod-set-info" exe="/usr/lib/udev/ipod-set-info" subj=system_u:system_r:udev_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1409782509.034:532): avc:  denied  { mount } for  pid=7047 comm="ipod-set-info" name="/" dev="sdd1" ino=1 scontext=system_u:system_r:udev_t:s0-s0:c0.c1023 tcontext=system_u:object_r:dosfs_t:s0 tclass=filesystem
----
time->Wed Sep  3 21:53:42 2014
type=PROCTITLE msg=audit(1409806422.424:379): proctitle=2F7573722F6C69622F73797374656D642F73797374656D64002D2D75736572
type=SYSCALL msg=audit(1409806422.424:379): arch=c000003e syscall=83 success=no exit=-13 a0=7fff00502440 a1=1ff a2=f a3=7f59813edd40 items=0 ppid=1 pid=2462 auid=4294967295 uid=1003 gid=1003 euid=1003 suid=1003 fsuid=1003 egid=1003 sgid=1003 fsgid=1003 tty=(none) ses=4294967295 comm="systemd" exe="/usr/lib/systemd/systemd" subj=system_u:system_r:init_t:s0 key=(null)
type=AVC msg=audit(1409806422.424:379): avc:  denied  { create } for  pid=2462 comm="systemd" name=".local" scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:gconf_home_t:s0 tclass=dir

Comment 3 Moez Roy 2014-09-12 11:51:41 UTC
SELinux is preventing /usr/lib/systemd/systemd from 'create' accesses on the directory .

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

If you believe that systemd should be allowed create access on the  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 /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:init_t:s0
Target Context                system_u:object_r:gconf_home_t:s0
Target Objects                 [ dir ]
Source                        systemd
Source Path                   /usr/lib/systemd/systemd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-208-21.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-183.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.16.2-200.fc20.x86_64 #1 SMP Mon
                              Sep 8 11:54:45 UTC 2014 x86_64 x86_64
Alert Count                   1
First Seen                    2014-09-12 04:47:34 PDT
Last Seen                     2014-09-12 04:47:34 PDT
Local ID                      5db5e9c5-97f7-4da1-9509-5360dceee484

Raw Audit Messages
type=AVC msg=audit(1410522454.112:374): avc:  denied  { create } for  pid=2355 comm="systemd" name=".local" scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:gconf_home_t:s0 tclass=dir permissive=0


type=SYSCALL msg=audit(1410522454.112:374): arch=x86_64 syscall=mkdir success=no exit=EACCES a0=7fff7eaae000 a1=1ff a2=f a3=7fecc0c30d40 items=0 ppid=1 pid=2355 auid=4294967295 uid=1003 gid=1003 euid=1003 suid=1003 fsuid=1003 egid=1003 sgid=1003 fsgid=1003 tty=(none) ses=4294967295 comm=systemd exe=/usr/lib/systemd/systemd subj=system_u:system_r:init_t:s0 key=(null)

Hash: systemd,init_t,gconf_home_t,dir,create

Comment 4 Moez Roy 2014-09-12 11:52:21 UTC
This AVC comes when I log in to TTY3 with another user account.

Comment 5 Daniel Walsh 2015-01-03 16:00:14 UTC
d8493d6f93067bb9b260a653f283cc5ac011b8df fixes this in git.

Comment 6 Lukas Vrabec 2015-01-15 15:54:46 UTC
commit 24187f7a93613c1812eac95b7617cb48e88eafda
Author: Dan Walsh <dwalsh>
Date:   Sat Jan 3 10:59:52 2015 -0500

    Allow init_t to create gnome content in homedirs

Comment 7 Fedora Update System 2015-01-27 16:56:27 UTC
selinux-policy-3.12.1-197.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-197.fc20

Comment 8 Fedora Update System 2015-01-30 04:41:27 UTC
Package selinux-policy-3.12.1-197.fc20:
* should fix your issue,
* was pushed to the Fedora 20 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-197.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-1398/selinux-policy-3.12.1-197.fc20
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2015-03-10 00:55:38 UTC
selinux-policy-3.12.1-197.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.