Bug 1413298

Summary: SELinux is preventing qemu-system-x86 from 'search' accesses on the directory 3278.
Product: [Fedora] Fedora Reporter: Lukas Slebodnik <lslebodn>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: dominick.grift, dwalsh, hhan, lvrabec, mgrepl, plautrba, pmoore, sgallagh, ssekidde, vindicators, vondruch
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:41235b9e601922d1e9cf5875fed96d15a3f9fe8aec8edb05f2b837974fbb0e06;VARIANT_ID=server;
Fixed In Version: selinux-policy-3.13.1-251.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1426106 (view as bug list) Environment:
Last Closed: 2017-05-09 21:21:01 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:
Bug Depends On:    
Bug Blocks: 1426106    

Description Lukas Slebodnik 2017-01-14 16:44:11 UTC
Description of problem:
I turned off virtual machine.

BTW the searched pid 3278 was pid of libvirt

sh# find /proc/ -inum 32545
/proc/3278
sh# ls -l /proc/3278/exe 
lrwxrwxrwx. 1 root root 0 Jan 13 18:45 /proc/3278/exe -> /usr/sbin/libvirtd
SELinux is preventing qemu-system-x86 from 'search' accesses on the directory 3278.

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

If you believe that qemu-system-x86 should be allowed search access on the 3278 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-x86' --raw | audit2allow -M my-qemusystemx86
# semodule -X 300 -i my-qemusystemx86.pp

Additional Information:
Source Context                system_u:system_r:svirt_t:s0:c180,c609
Target Context                system_u:system_r:virtd_t:s0-s0:c0.c1023
Target Objects                3278 [ dir ]
Source                        qemu-system-x86
Source Path                   qemu-system-x86
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-233.fc26.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.8.15-300.fc25.x86_64 #1 SMP Thu
                              Dec 15 23:10:23 UTC 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2017-01-14 17:39:01 CET
Last Seen                     2017-01-14 17:39:01 CET
Local ID                      5417c5fe-d046-4191-8de3-20d5c6cf25e3

Raw Audit Messages
type=AVC msg=audit(1484411941.773:906): avc:  denied  { search } for  pid=21632 comm="qemu-system-x86" name="3278" dev="proc" ino=32545 scontext=system_u:system_r:svirt_t:s0:c180,c609 tcontext=system_u:system_r:virtd_t:s0-s0:c0.c1023 tclass=dir permissive=0


Hash: qemu-system-x86,svirt_t,virtd_t,dir,search

Version-Release number of selected component:
selinux-policy-3.13.1-233.fc26.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.0
hashmarkername: setroubleshoot
kernel:         4.8.15-300.fc25.x86_64
type:           libreport

Comment 1 Han Han 2017-02-23 08:22:26 UTC
Reproduced on selinux-policy-3.13.1-240.fc26

Comment 2 Fedora End Of Life 2017-02-28 10:59:22 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 3 Stephen Gallagher 2017-03-27 12:22:20 UTC
Description of problem:
I powered off a CentOS 7.3 virtual machine (running under KVM on my Fedora 26 Alpha OS).

Version-Release number of selected component:
selinux-policy-3.13.1-246.fc26.noarch

Additional info:
reporter:       libreport-2.9.0
hashmarkername: setroubleshoot
kernel:         4.11.0-0.rc2.git2.2.fc26.x86_64
type:           libreport

Comment 4 Fedora Update System 2017-04-19 20:38:21 UTC
selinux-policy-3.13.1-251.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-f36794dd98

Comment 5 Fedora Update System 2017-04-20 20:23:17 UTC
selinux-policy-3.13.1-251.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-f36794dd98

Comment 6 Fedora Update System 2017-05-09 21:21:01 UTC
selinux-policy-3.13.1-251.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.