Bug 1427311 - SELinux is preventing nvidia-installe from 'module_load' accesses on the system /tmp/NVIDIA-Linux-x86_64-375.39/kernel/nvidia.ko.
Summary: SELinux is preventing nvidia-installe from 'module_load' accesses on the syst...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 25
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:941d674f870900f3989b3360019...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-27 21:33 UTC by akiross
Modified: 2017-05-26 15:47 UTC (History)
11 users (show)

Fixed In Version: selinux-policy-3.13.1-225.16.fc25
Clone Of:
Environment:
Last Closed: 2017-05-19 23:02:36 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description akiross 2017-02-27 21:33:39 UTC
Description of problem:
Trying to install bumblebee and compiling the kernel module, the installer failed due to selinux. Issue is not present using `setenforce 0`.
The problem was not present before the last update (updated today) and nvidia.ko was compiled successfully.
SELinux is preventing nvidia-installe from 'module_load' accesses on the system /tmp/NVIDIA-Linux-x86_64-375.39/kernel/nvidia.ko.

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

If you believe that nvidia-installe should be allowed module_load access on the nvidia.ko system 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 'nvidia-installe' --raw | audit2allow -M my-nvidiainstalle
# semodule -X 300 -i my-nvidiainstalle.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Context                unconfined_u:object_r:user_tmp_t:s0
Target Objects                /tmp/NVIDIA-Linux-x86_64-375.39/kernel/nvidia.ko [
                              system ]
Source                        nvidia-installe
Source Path                   nvidia-installe
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-225.10.fc25.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.9.11-200.fc25.x86_64 #1 SMP Mon
                              Feb 20 18:11:59 UTC 2017 x86_64 x86_64
Alert Count                   1
First Seen                    2017-02-27 22:24:17 CET
Last Seen                     2017-02-27 22:24:17 CET
Local ID                      7c0b65e2-1c28-4f96-8de1-ceb6ea97b931

Raw Audit Messages
type=AVC msg=audit(1488230657.639:443): avc:  denied  { module_load } for  pid=24117 comm="nvidia-installe" path="/tmp/NVIDIA-Linux-x86_64-375.39/kernel/nvidia.ko" dev="tmpfs" ino=105214 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=system permissive=0


Hash: nvidia-installe,unconfined_t,user_tmp_t,system,module_load

Version-Release number of selected component:
selinux-policy-3.13.1-225.10.fc25.noarch

Additional info:
reporter:       libreport-2.8.0
hashmarkername: setroubleshoot
kernel:         4.9.11-200.fc25.x86_64
type:           libreport

Comment 1 akiross 2017-02-27 21:55:15 UTC
I think this is related: https://bugzilla.redhat.com/show_bug.cgi?id=1427031

Comment 2 Ricardo Garcia 2017-02-28 09:51:34 UTC
After the update for the bug below, the kernel module loads properly once installed:

https://bugzilla.redhat.com/show_bug.cgi?id=1426741

However, I still need to run "setenforce 0" before running the installer, followed by "setenforce 1" once the driver has been installed.

Comment 3 akiross 2017-03-01 15:48:50 UTC
In my case, `setenforce 0` is not required and the installer seems to work fine.

Comment 4 Ricardo Garcia 2017-03-05 16:01:18 UTC
I've tested several times and in my case it seems to be required. Just to clarify, /tmp is mounted as a tmpfs for me, and I run the installer without any special options, i.e., without extracting its contents first.

Comment 5 Michael O'Brien 2017-05-10 03:08:03 UTC
Description of problem:
Nvidia installer could not load kernel module due to SELinux.  This should be allowed.  

workaround 

# ausearch -c 'nvidia-installe' --raw | audit2allow -M my-nvidiainstalle
# semodule -X 300 -i my-nvidiainstalle.pp

Version-Release number of selected component:
selinux-policy-3.13.1-225.11.fc25.noarch

Additional info:
reporter:       libreport-2.8.0
hashmarkername: setroubleshoot
kernel:         4.10.6-200.fc25.x86_64
type:           libreport

Comment 6 Fedora Update System 2017-05-15 21:18:18 UTC
selinux-policy-3.13.1-225.16.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-9a20533d62

Comment 7 Fedora Update System 2017-05-17 01:07:53 UTC
selinux-policy-3.13.1-225.16.fc25 has been pushed to the Fedora 25 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-2017-9a20533d62

Comment 8 Fedora Update System 2017-05-19 23:02:36 UTC
selinux-policy-3.13.1-225.16.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Ricardo Garcia 2017-05-26 15:47:25 UTC
The last update fixed the problem for me as well. Thank you very much! :-)


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