Bug 1705685

Summary: SELinux is preventing qemu-system-x86 from 'open' accesses on the chr_file /dev/nvidiactl.
Product: [Fedora] Fedora Reporter: Braden McDaniel <braden>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 30CC: dwalsh, lvrabec, mgrepl, plautrba, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:c658101927a0de59ad1b132a768cb0e23d4128d1d7dd6050553e94b930bff7d4;VARIANT_ID=workstation;
Fixed In Version: selinux-policy-3.14.3-37.fc30 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-21 01:09:35 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 Braden McDaniel 2019-05-02 18:37:30 UTC
Description of problem:
Tried to start VM in GNOME Boxes.
SELinux is preventing qemu-system-x86 from 'open' accesses on the chr_file /dev/nvidiactl.

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

If you believe that qemu-system-x86 should be allowed open access on the nvidiactl chr_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                unconfined_u:unconfined_r:svirt_t:s0:c289,c970
Target Context                system_u:object_r:xserver_misc_device_t:s0
Target Objects                /dev/nvidiactl [ chr_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.14.3-32.fc30.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.0.9-301.fc30.x86_64 #1 SMP Tue
                              Apr 23 23:57:35 UTC 2019 x86_64 x86_64
Alert Count                   1
First Seen                    2019-05-02 14:36:21 EDT
Last Seen                     2019-05-02 14:36:21 EDT
Local ID                      837b3278-4d70-4f4f-b5a9-4ad3e3693837

Raw Audit Messages
type=AVC msg=audit(1556822181.914:393): avc:  denied  { open } for  pid=9068 comm="qemu-system-x86" path="/dev/nvidiactl" dev="devtmpfs" ino=21351 scontext=unconfined_u:unconfined_r:svirt_t:s0:c289,c970 tcontext=system_u:object_r:xserver_misc_device_t:s0 tclass=chr_file permissive=0


Hash: qemu-system-x86,svirt_t,xserver_misc_device_t,chr_file,open

Version-Release number of selected component:
selinux-policy-3.14.3-32.fc30.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.10.0
hashmarkername: setroubleshoot
kernel:         5.0.9-301.fc30.x86_64
type:           libreport

Comment 2 Lukas Vrabec 2019-05-15 10:22:47 UTC
commit e1284a7c6e06f92dcadfcbb9b26149c5797cd336 (HEAD -> rawhide)
Author: Lukas Vrabec <lvrabec>
Date:   Wed May 15 12:22:27 2019 +0200

    Allow virt domains to access xserver devices BZ(1705685)

Comment 3 Fedora Update System 2019-05-18 11:03:32 UTC
selinux-policy-3.14.3-37.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-40c077f70d

Comment 4 Fedora Update System 2019-05-19 00:51:04 UTC
selinux-policy-3.14.3-37.fc30 has been pushed to the Fedora 30 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-2019-40c077f70d

Comment 5 Fedora Update System 2019-05-21 01:09:35 UTC
selinux-policy-3.14.3-37.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.