Bug 1470631

Summary: SELinux is preventing qemu-system-x86 from 'read' accesses on the file cmdline.
Product: [Fedora] Fedora Reporter: Yaniv Kaul <ykaul>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: bugreports, dominick.grift, dwalsh, hx, lvrabec, mgrepl, mnikifor, plautrba, pmoore, public, ssekidde
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:1578221644b059be1b5facc7e57854ce3972fd4e4ed75be95c00bab2dac65c98;VARIANT_ID=workstation;
Fixed In Version: selinux-policy-3.13.1-260.13.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-17 10:33:37 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 Yaniv Kaul 2017-07-13 10:38:46 UTC
Description of problem:
SELinux is preventing qemu-system-x86 from 'read' accesses on the file cmdline.

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

If you believe that qemu-system-x86 should be allowed read access on the cmdline 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:
# 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:c267,c505
Target Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Objects                cmdline [ 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-259.fc26.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.11.9-300.fc26.x86_64 #1 SMP Wed
                              Jul 5 16:21:56 UTC 2017 x86_64 x86_64
Alert Count                   1
First Seen                    2017-07-13 06:37:38 EDT
Last Seen                     2017-07-13 06:37:38 EDT
Local ID                      cd4a4bce-9886-4b3c-a622-3671d9dfe664

Raw Audit Messages
type=AVC msg=audit(1499942258.349:695): avc:  denied  { read } for  pid=12081 comm="qemu-system-x86" name="cmdline" dev="proc" ino=340259 scontext=system_u:system_r:svirt_t:s0:c267,c505 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=file permissive=1


Hash: qemu-system-x86,svirt_t,unconfined_t,file,read

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

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.11.9-300.fc26.x86_64
type:           libreport

Comment 1 bugreports 2017-09-04 19:19:16 UTC
Description of problem:
Running Windows 10 VM.

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

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.8-300.fc26.x86_64
type:           libreport

Comment 2 bugreports 2017-10-17 00:19:06 UTC
Description of problem:
Happens after shutting down a Windows VM.

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

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.13.5-200.fc26.x86_64
type:           libreport

Comment 3 Lukas Vrabec 2017-10-17 10:33:37 UTC
This should be fixed in the latest selinux-policy package update.

Comment 4 bugreports 2017-10-18 03:36:55 UTC
Description of problem:
Happens when shutting down my Windows VM in Gnome Boxes.

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

Additional info:
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.13.5-200.fc26.x86_64
type:           libreport

Comment 5 gaxweb 2017-10-27 07:43:10 UTC
(In reply to Lukas Vrabec from comment #3)
> This should be fixed in the latest selinux-policy package update.

Just occurred for me with 3.13.1-260.13.fc26 installed.