Bug 585068

Summary: SELinux is preventing /usr/bin/qemu-kvm "write" access on lib.
Product: [Fedora] Fedora Reporter: Naoki <naoki>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: dwalsh, eric, hafflys, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:755be5fa61a8095fcb0f895e5e675cbf339e69728f5a59e93c9c525ab270a398
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-29 16:38:09 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 Naoki 2010-04-23 03:48:03 UTC
Summary:

SELinux is preventing /usr/bin/qemu-kvm "write" access on lib.

Detailed Description:

SELinux denied access requested by qemu-kvm. It is not expected that this access
is required by qemu-kvm and this access may signal an intrusion attempt. It is
also possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                system_u:system_r:svirt_t:s0:c112,c533
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                lib [ dir ]
Source                        qemu-kvm
Source Path                   /usr/bin/qemu-kvm
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           qemu-system-x86-0.12.3-6.fc13
Target RPM Packages           filesystem-2.4.31-1.fc13
Policy RPM                    selinux-policy-3.7.15-4.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.33.2-41.fc13.x86_64 #1 SMP Mon Apr 12 14:09:42
                              UTC 2010 x86_64 x86_64
Alert Count                   1
First Seen                    Thu 22 Apr 2010 08:20:23 PM JST
Last Seen                     Thu 22 Apr 2010 08:20:23 PM JST
Local ID                      4499aa83-7f29-4559-aa92-c39fa0cf7943
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1271935223.608:98): avc:  denied  { write } for  pid=6977 comm="qemu-kvm" name="lib" dev=dm-2 ino=21102938 scontext=system_u:system_r:svirt_t:s0:c112,c533 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=dir

node=(removed) type=SYSCALL msg=audit(1271935223.608:98): arch=c000003e syscall=49 success=no exit=-13 a0=3 a1=7fff0cea27e0 a2=6e a3=6f532f62696c2f75 items=0 ppid=1 pid=6977 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm="qemu-kvm" exe="/usr/bin/qemu-kvm" subj=system_u:system_r:svirt_t:s0:c112,c533 key=(null)



Hash String generated from  catchall,qemu-kvm,svirt_t,user_home_t,dir,write
audit2allow suggests:

#============= svirt_t ==============
#!!!! The source type 'svirt_t' can write to a 'dir' of the following types:
# svirt_var_run_t, tmp_t, var_t, svirt_tmp_t, hugetlbfs_t, tmpfs_t, var_run_t, svirt_cache_t, svirt_image_t, svirt_tmpfs_t, dosfs_t

allow svirt_t user_home_t:dir write;

Comment 1 Daniel Walsh 2010-04-23 14:51:34 UTC
This looks like you have a lib directory labeles user_home_t?  I think you have a labeling issue/