Bug 980875

Summary: SELinux is preventing /usr/bin/qemu-system-x86_64 from 'getattr' accesses on the filesystem /.
Product: [Fedora] Fedora Reporter: Martin <mholec>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: dominick.grift, dwalsh, mgrepl, tpelka
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:ff04277957a936d9d32ae0d53f0ca87c4d0deeb65c2887fc8a927b99b3639e2d
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-03 12:45:42 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 Martin 2013-07-03 12:09:27 UTC
Description of problem:
SELinux is preventing /usr/bin/qemu-system-x86_64 from 'getattr' accesses on the filesystem /.

*****  Plugin catchall_boolean (89.3 confidence) suggests  *******************

If you want to allow confined virtual guests to manage nfs files
Then you must tell SELinux about this by enabling the 'virt_use_nfs' boolean.
You can read 'virt_selinux' man page for more details.
Do
setsebool -P virt_use_nfs 1

*****  Plugin catchall (11.6 confidence) suggests  ***************************

If you believe that qemu-system-x86_64 should be allowed getattr access on the  filesystem 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 qemu-system-x86 /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:system_r:svirt_t:s0:c80,c561
Target Context                system_u:object_r:nfs_t:s0
Target Objects                / [ filesystem ]
Source                        qemu-system-x86
Source Path                   /usr/bin/qemu-system-x86_64
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           qemu-system-x86-1.4.2-4.fc19.x86_64
Target RPM Packages           filesystem-3.2-12.fc19.x86_64
Policy RPM                    selinux-policy-3.12.1-54.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.9.8-300.fc19.x86_64 #1 SMP Thu
                              Jun 27 19:24:23 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-07-03 14:02:35 CEST
Last Seen                     2013-07-03 14:02:35 CEST
Local ID                      04c08fe3-f026-451f-a810-f38c8103b3ed

Raw Audit Messages
type=AVC msg=audit(1372852955.754:477): avc:  denied  { getattr } for  pid=4105 comm="qemu-system-x86" name="/" dev="0:40" ino=50 scontext=unconfined_u:system_r:svirt_t:s0:c80,c561 tcontext=system_u:object_r:nfs_t:s0 tclass=filesystem


type=SYSCALL msg=audit(1372852955.754:477): arch=x86_64 syscall=fstatfs success=yes exit=0 a0=10 a1=7fff32628b20 a2=0 a3=1 items=0 ppid=1 pid=4105 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 ses=1 tty=(none) comm=qemu-system-x86 exe=/usr/bin/qemu-system-x86_64 subj=unconfined_u:system_r:svirt_t:s0:c80,c561 key=(null)

Hash: qemu-system-x86,svirt_t,nfs_t,filesystem,getattr

Additional info:
reporter:       libreport-2.1.5
hashmarkername: setroubleshoot
kernel:         3.9.8-300.fc19.x86_64
type:           libreport

Comment 1 Daniel Walsh 2013-07-03 12:45:42 UTC

*** This bug has been marked as a duplicate of bug 980874 ***