Bug 1284147 - SELinux is preventing qemu-system-x86 from 'open' accesses on the file /media/casa.local/data/bodhi-3.1.1-64.iso.
SELinux is preventing qemu-system-x86 from 'open' accesses on the file /media...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
23
x86_64 Unspecified
low Severity low
: ---
: ---
Assigned To: Lukas Vrabec
Fedora Extras Quality Assurance
abrt_hash:e5b3b7c6853b733233db9c11db8...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-20 21:36 EST by Martín Cigorraga
Modified: 2015-11-23 10:35 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-23 09:18:43 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Martín Cigorraga 2015-11-20 21:36:06 EST
Description of problem:
SELinux is preventing qemu-system-x86 from 'open' accesses on the file /media/casa.local/data/bodhi-3.1.1-64.iso.

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

If you want to allow virt to use samba
Then you must tell SELinux about this by enabling the 'virt_use_samba' boolean.
You can read 'None' man page for more details.
Do
setsebool -P virt_use_samba 1

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

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

Additional Information:
Source Context                unconfined_u:unconfined_r:svirt_t:s0:c206,c782
Target Context                system_u:object_r:cifs_t:s0
Target Objects                /media/casa.local/data/bodhi-3.1.1-64.iso [ file ]
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-154.fc23.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.2.6-300.fc23.x86_64 #1 SMP Tue
                              Nov 10 19:32:21 UTC 2015 x86_64 x86_64
Alert Count                   3
First Seen                    2015-11-20 22:54:17 ART
Last Seen                     2015-11-20 22:54:17 ART
Local ID                      781cf199-aab7-4574-bf4e-dce8ca418b43

Raw Audit Messages
type=AVC msg=audit(1448070857.430:1199): avc:  denied  { open } for  pid=16644 comm="qemu-system-x86" path="/media/casa.local/data/bodhi-3.1.1-64.iso" dev="cifs" ino=251486 scontext=unconfined_u:unconfined_r:svirt_t:s0:c206,c782 tcontext=system_u:object_r:cifs_t:s0 tclass=file permissive=0


Hash: qemu-system-x86,svirt_t,cifs_t,file,open

Version-Release number of selected component:
selinux-policy-3.13.1-154.fc23.noarch

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.2.6-300.fc23.x86_64
type:           libreport
Comment 1 Lukas Vrabec 2015-11-23 09:18:43 EST
To fix this issue use: 
*****  Plugin catchall_boolean (89.3 confidence) suggests   ******************

If you want to allow virt to use samba
Then you must tell SELinux about this by enabling the 'virt_use_samba' boolean.
You can read 'None' man page for more details.
Do
setsebool -P virt_use_samba 1
Comment 2 Martín Cigorraga 2015-11-23 10:35:42 EST
Hello Lukas,

Yes, that's what I did and everything now works as expected, thank you.

Note You need to log in before you can comment on or make changes to this bug.