Bug 685120

Summary: SELinux is preventing /bin/systemd-tmpfiles from 'getattr' accesses on the blk_file /tmp/initrd.xlJhLZ/dev/ram0.
Product: [Fedora] Fedora Reporter: Lukas Bezdicka <social>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:bc32e94b0e476dc3e69eeae9a2b687f3d2ba6005b8cfbec234ef505dfcbb9c8f
Fixed In Version: selinux-policy-3.9.16-5.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-19 05:54:15 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 Lukas Bezdicka 2011-03-15 11:11:51 UTC
SELinux is preventing /bin/systemd-tmpfiles from 'getattr' accesses on the blk_file /tmp/initrd.xlJhLZ/dev/ram0.

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

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

Additional Information:
Source Context                system_u:system_r:systemd_tmpfiles_t:s0
Target Context                unconfined_u:object_r:user_tmp_t:s0
Target Objects                /tmp/initrd.xlJhLZ/dev/ram0 [ blk_file ]
Source                        systemd-tmpfile
Source Path                   /bin/systemd-tmpfiles
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-units-20-1.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-3.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.38-1.fc15.x86_64 #1 SMP Tue
                              Mar 15 05:29:00 UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Tue 15 Mar 2011 11:37:10 AM CET
Last Seen                     Tue 15 Mar 2011 11:37:10 AM CET
Local ID                      f067cf28-b4c3-4211-99c2-57b6f1911a2f

Raw Audit Messages
type=AVC msg=audit(1300185430.304:64): avc:  denied  { getattr } for  pid=2065 comm="systemd-tmpfile" path="/tmp/initrd.xlJhLZ/dev/ram0" dev=sda1 ino=265168 scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=blk_file


type=SYSCALL msg=audit(1300185430.304:64): arch=x86_64 syscall=newfstatat success=yes exit=0 a0=7 a1=9e9c53 a2=7fff0978e1d0 a3=100 items=0 ppid=1 pid=2065 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=systemd-tmpfile exe=/bin/systemd-tmpfiles subj=system_u:system_r:systemd_tmpfiles_t:s0 key=(null)

Hash: systemd-tmpfile,systemd_tmpfiles_t,user_tmp_t,blk_file,getattr

audit2allow

#============= systemd_tmpfiles_t ==============
allow systemd_tmpfiles_t user_tmp_t:blk_file getattr;

audit2allow -R

#============= systemd_tmpfiles_t ==============
allow systemd_tmpfiles_t user_tmp_t:blk_file getattr;

Comment 1 Daniel Walsh 2011-03-15 11:59:43 UTC
selinux-policy-3.9.16-4.fc15

Comment 2 Fedora Update System 2011-03-17 15:29:06 UTC
selinux-policy-3.9.16-5.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-5.fc15

Comment 3 Fedora Update System 2011-03-19 05:53:18 UTC
selinux-policy-3.9.16-5.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.