Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1500683

Summary: SELinux is preventing gnome-shell from 'map' accesses on the chr_file /dev/nvidia0.
Product: [Fedora] Fedora Reporter: Hedayat Vatankhah <hedayatv>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: bugzilla, dwalsh, lsm5, lvrabec, mavit, mgrepl, plautrba, pmoore
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:8a4067c37a824b6cacb88e1ffe00bb99b40a2feffed47db6664ecec4cf81924b;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-17 08:31:34 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 Hedayat Vatankhah 2017-10-11 10:41:55 UTC
Description of problem:
Installed binary nvidia driver from RPMFusion
SELinux is preventing gnome-shell from 'map' accesses on the chr_file /dev/nvidia0.

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

If you believe that gnome-shell should be allowed map access on the nvidia0 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 'gnome-shell' --raw | audit2allow -M my-gnomeshell
# semodule -X 300 -i my-gnomeshell.pp

Additional Information:
Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:xserver_misc_device_t:s0
Target Objects                /dev/nvidia0 [ chr_file ]
Source                        gnome-shell
Source Path                   gnome-shell
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-283.5.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.13.5-300.fc27.x86_64 #1 SMP Thu
                              Oct 5 16:57:11 UTC 2017 x86_64 x86_64
Alert Count                   12
First Seen                    2017-10-11 13:58:00 +0330
Last Seen                     2017-10-11 14:01:00 +0330
Local ID                      af86913d-14e9-429a-8418-a0d31ded80eb

Raw Audit Messages
type=AVC msg=audit(1507717860.4:579): avc:  denied  { map } for  pid=4880 comm="gnome-shell" path="/dev/nvidia0" dev="devtmpfs" ino=27667 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:xserver_misc_device_t:s0 tclass=chr_file permissive=1


Hash: gnome-shell,xdm_t,xserver_misc_device_t,chr_file,map

Version-Release number of selected component:
selinux-policy-3.13.1-283.5.fc27.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.2
hashmarkername: setroubleshoot
kernel:         4.13.5-300.fc27.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2017-10-17 08:31:34 UTC
# sesearch -A -s xdm_t -t xserver_misc_device_t -c chr_file -p map 
allow xdm_t xserver_misc_device_t:chr_file { append getattr ioctl lock map open read setattr write };

Fixed in the latest selinux-policy update.

Comment 2 Peter Oliver 2018-07-07 14:15:52 UTC
Description of problem:
Since updating to selinux-policy-3.13.1-283.35, gdm is unable to start under the proprietary NVidia driver.

Version-Release number of selected component:
selinux-policy-3.13.1-283.35.fc27.noarch

Additional info:
reporter:       libreport-2.9.3
hashmarkername: setroubleshoot
kernel:         4.17.3-100.fc27.x86_64
type:           libreport

Comment 3 Todd Savoie 2018-07-11 23:44:11 UTC
Description of problem:
1. Ran DNF of the following packages:

selinux-policy                              noarch 3.13.1-283.35.fc27            
selinux-policy-targeted                     noarch 3.13.1-283.35.fc27            

2. Rebooted

Version-Release number of selected component:
selinux-policy-3.13.1-283.35.fc27.noarch

Additional info:
reporter:       libreport-2.9.3
hashmarkername: setroubleshoot
kernel:         4.17.3-100.fc27.x86_64
type:           libreport