Bug 1659746

Summary: SELinux is preventing qemu-system-arm from 'search' accesses on the directory 920.
Product: [Fedora] Fedora Reporter: lutingrong
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: dwalsh, lvrabec, mgrepl, plautrba, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:b4f2b4b32791c882420a3fe3711a8ae773fd46b000baacf55f5e923c9fe32691;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-10 17:56:46 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 lutingrong 2018-12-16 02:03:45 UTC
Description of problem:
I created a armhf architecture virtual machine with qemu.
SELinux is preventing qemu-system-arm from 'search' accesses on the directory 920.

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

If you believe that qemu-system-arm should be allowed search access on the 920 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:
# ausearch -c 'qemu-system-arm' --raw | audit2allow -M my-qemusystemarm
# semodule -X 300 -i my-qemusystemarm.pp

Additional Information:
Source Context                system_u:system_r:svirt_tcg_t:s0:c113,c864
Target Context                system_u:system_r:virtd_t:s0-s0:c0.c1023
Target Objects                920 [ dir ]
Source                        qemu-system-arm
Source Path                   qemu-system-arm
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.1-48.fc28.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.19.8-200.fc28.x86_64 #1 SMP Mon
                              Dec 10 15:43:40 UTC 2018 x86_64 x86_64
Alert Count                   1
First Seen                    2018-12-15 13:35:15 CST
Last Seen                     2018-12-15 13:35:15 CST
Local ID                      ca9f02a7-7bc1-4e4b-83bb-5051778e154b

Raw Audit Messages
type=AVC msg=audit(1544852115.911:654): avc:  denied  { search } for  pid=8843 comm="qemu-system-arm" name="920" dev="proc" ino=314661 scontext=system_u:system_r:svirt_tcg_t:s0:c113,c864 tcontext=system_u:system_r:virtd_t:s0-s0:c0.c1023 tclass=dir permissive=0


Hash: qemu-system-arm,svirt_tcg_t,virtd_t,dir,search

Version-Release number of selected component:
selinux-policy-3.14.1-48.fc28.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.5
hashmarkername: setroubleshoot
kernel:         4.19.8-200.fc28.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2019-01-10 17:56:46 UTC
commit b8e9dd11901638f44cd3c3982533841e75e85582
Author: Lukas Vrabec <lvrabec>
Date:   Wed Jul 25 19:03:07 2018 +0200

    Allow svirt_tcg_t domain to read system state of virtd_t domains


This should be already fixed in SELinux policy. Could you update selinux-policy package? 

Thanks,
Lukas.