Bug 685122

Summary: SELinux is preventing /bin/systemd-tmpfiles from 'getattr' accesses on the chr_file /tmp/initrd.xlJhLZ/dev/tty0.
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:24079fdb93ec95830ddf089fcd38d1886607a5d51b061e29b196bc32cd1d569b
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:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Lukas Bezdicka 2011-03-15 11:17:41 UTC
SELinux is preventing /bin/systemd-tmpfiles from 'getattr' accesses on the chr_file /tmp/initrd.xlJhLZ/dev/tty0.

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

If you believe that systemd-tmpfiles should be allowed getattr access on the tty0 chr_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/tty0 [ chr_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                      5056b033-550c-4715-80b9-b416a9e8bee3

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


type=SYSCALL msg=audit(1300185430.300:63): arch=x86_64 syscall=newfstatat success=yes exit=0 a0=7 a1=9e9a0b 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,chr_file,getattr

audit2allow

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

audit2allow -R

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

Comment 1 Daniel Walsh 2011-03-15 12:00:17 UTC
Fixed in selinux-policy-3.9.16-4.fc15

Comment 2 Fedora Update System 2011-03-17 15:29:11 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:23 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.