Bug 1179166 - SELinux is preventing /usr/bin/nvidia-modprobe from read access on the file. (and write too)
Summary: SELinux is preventing /usr/bin/nvidia-modprobe from read access on the file. ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-06 10:31 UTC by Germano Massullo
Modified: 2017-03-03 10:16 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-03-03 10:16:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Germano Massullo 2015-01-06 10:31:44 UTC
Description of problem:
SELinux prevents nvidia-uvm module to be correctly loaded at system startup. (part of nVidia drivers from RPMFusion).
I got two errors, one for read, one for write attempt.
The only way to load the module is to manually do
# modprobe nvidia-uvm
If I disable SELinux, the module is correctly loaded at system startup.



===================================================
SELinux is preventing /usr/bin/nvidia-modprobe from read access on the file .

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

If si crede che nvidia-modprobe dovrebbe avere possibilità di accesso read sui  file in modo predefinito.
Then si dovrebbe riportare il problema come bug.
E' possibile generare un modulo di politica locale per consentire questo accesso.
Do
consentire questo accesso per il momento eseguendo:
# grep nvidia-modprobe /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:boinc_t:s0
Target Context                system_u:object_r:sysctl_modprobe_t:s0
Target Objects                 [ file ]
Source                        nvidia-modprobe
Source Path                   /usr/bin/nvidia-modprobe
Port                          <Unknown>
Source RPM Packages           xorg-x11-drv-nvidia-331.113-1.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-196.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Platform                      Linux 3.17.7-200.fc20.x86_64 #1 SMP Wed
                              Dec 17 03:35:33 UTC 2014 x86_64 x86_64
Alert Count                   2
First Seen                    2015-01-06 10:49:02 CET
Last Seen                     2015-01-06 11:23:38 CET

Raw Audit Messages
type=AVC msg=audit(1420539818.125:427): avc:  denied  { read } for  pid=2836 comm="nvidia-modprobe" name="modprobe" dev="proc" ino=21506 scontext=system_u:system_r:boinc_t:s0 tcontext=system_u:object_r:sysctl_modprobe_t:s0 tclass=file permissive=0


type=SYSCALL msg=audit(1420539818.125:427): arch=x86_64 syscall=open success=no exit=EACCES a0=404d2f a1=0 a2=1b6 a3=7fffc3e691e0 items=0 ppid=2835 pid=2836 auid=4294967295 uid=991 gid=988 euid=0 suid=0 fsuid=0 egid=988 sgid=988 fsgid=988 tty=(none) ses=4294967295 comm=nvidia-modprobe exe=/usr/bin/nvidia-modprobe subj=system_u:system_r:boinc_t:s0 key=(null)

Hash: nvidia-modprobe,boinc_t,sysctl_modprobe_t,file,read

===================================================


===================================================
SELinux is preventing /usr/bin/nvidia-modprobe from write access on the directory .

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

If si crede che nvidia-modprobe dovrebbe avere possibilità di accesso write sui  directory in modo predefinito.
Then si dovrebbe riportare il problema come bug.
E' possibile generare un modulo di politica locale per consentire questo accesso.
Do
consentire questo accesso per il momento eseguendo:
# grep nvidia-modprobe /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:boinc_t:s0
Target Context                system_u:object_r:device_t:s0
Target Objects                 [ dir ]
Source                        nvidia-modprobe
Source Path                   /usr/bin/nvidia-modprobe
Port                          <Unknown>
Source RPM Packages           xorg-x11-drv-nvidia-331.113-1.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-196.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Platform                      Linux  3.17.7-200.fc20.x86_64 #1 SMP Wed
                              Dec 17 03:35:33 UTC 2014 x86_64 x86_64
Alert Count                   3
First Seen                    2015-01-06 02:41:00 CET
Last Seen                     2015-01-06 02:47:48 CET

Raw Audit Messages
type=AVC msg=audit(1420508868.195:353): avc:  denied  { write } for  pid=1312 comm="nvidia-modprobe" name="/" dev="devtmpfs" ino=1025 scontext=system_u:system_r:boinc_t:s0 tcontext=system_u:object_r:device_t:s0 tclass=dir permissive=0


type=SYSCALL msg=audit(1420508868.195:353): arch=x86_64 syscall=mknod success=no exit=EACCES a0=7fff192c7860 a1=21b6 a2=c3ff a3=7fff192c7490 items=0 ppid=1311 pid=1312 auid=4294967295 uid=991 gid=988 euid=0 suid=0 fsuid=0 egid=988 sgid=988 fsgid=988 tty=(none) ses=4294967295 comm=nvidia-modprobe exe=/usr/bin/nvidia-modprobe subj=system_u:system_r:boinc_t:s0 key=(null)

Hash: nvidia-modprobe,boinc_t,device_t,dir,write
===================================================


Version-Release number of selected component (if applicable):
libselinux-devel-2.2.1-6.fc20.x86_64
libselinux-python-2.2.1-6.fc20.x86_64
libselinux-2.2.1-6.fc20.i686
selinux-policy-3.12.1-196.fc20.noarch
selinux-policy-targeted-3.12.1-196.fc20.noarch
libselinux-2.2.1-6.fc20.x86_64
libselinux-utils-2.2.1-6.fc20.x86_64
selinux-policy-doc-3.12.1-196.fc20.noarch
selinux-policy-devel-3.12.1-196.fc20.noarch

Comment 1 Nicolas Chauvet (kwizart) 2015-01-12 23:09:14 UTC
Are you sure not to have label issues ? It's working fine with me on f21
try touch /.autorelabel , reboot and retry

Comment 2 Germano Massullo 2015-01-12 23:14:00 UTC
(In reply to Nicolas Chauvet (kwizart) from comment #1)
> Are you sure not to have label issues ? It's working fine with me on f21
> try touch /.autorelabel , reboot and retry

I have already done a relabel, but using a different command

Comment 3 Fedora End Of Life 2015-05-29 13:35:00 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Germano Massullo 2015-12-01 19:56:28 UTC
Confirming also on F23

Comment 5 Nicolas Chauvet (kwizart) 2017-03-03 10:16:51 UTC
The nvidia-modprobe utility does operate correctly under SELinux here. (f24).


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