Bug 1282101 - SELinux is preventing /usr/bin/nvidia-modprobe from 'add_name' accesses on the directory nvidiactl.
Summary: SELinux is preventing /usr/bin/nvidia-modprobe from 'add_name' accesses on th...
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 22
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:c9c3a8b0ab76a7c983d3e1b1569...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-14 22:34 UTC by Rich Fellinger
Modified: 2016-01-29 13:29 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-01-29 13:29:51 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Rich Fellinger 2015-11-14 22:34:05 UTC
Description of problem:
This problem accurs because selinux is enabled.  It can be reproduced bu installing the NVIDIA drivers.

Why can't nvidia-modprobe have the access to the nvidiactl directory by default?
SELinux is preventing /usr/bin/nvidia-modprobe from 'add_name' accesses on the directory nvidiactl.

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

If you believe that nvidia-modprobe should be allowed add_name access on the nvidiactl directory 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:
# grep nvidia-modprobe /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:device_t:s0
Target Objects                nvidiactl [ dir ]
Source                        nvidia-modprobe
Source Path                   /usr/bin/nvidia-modprobe
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-128.18.fc22.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.2.5-201.fc22.x86_64 #1 SMP Wed
                              Oct 28 20:00:23 UTC 2015 x86_64 x86_64
Alert Count                   8
First Seen                    2015-11-12 12:26:13 CST
Last Seen                     2015-11-13 11:20:34 CST
Local ID                      c536224b-7e2a-416b-9333-a951c6b2de85

Raw Audit Messages
type=AVC msg=audit(1447435234.797:546): avc:  denied  { add_name } for  pid=2075 comm="nvidia-modprobe" name="nvidiactl" scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=dir permissive=0


type=SYSCALL msg=audit(1447435234.797:546): arch=x86_64 syscall=mknod success=no exit=EACCES a0=7ffe7d48d110 a1=21b6 a2=c3ff a3=5c2 items=0 ppid=2060 pid=2075 auid=4294967295 uid=42 gid=42 euid=0 suid=0 fsuid=0 egid=42 sgid=42 fsgid=42 tty=tty1 ses=4294967295 comm=nvidia-modprobe exe=/usr/bin/nvidia-modprobe subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)

Hash: nvidia-modprobe,xdm_t,device_t,dir,add_name

Version-Release number of selected component:
selinux-policy-3.13.1-128.18.fc22.noarch

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.2.5-201.fc22.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2015-11-20 13:10:48 UTC
How is nvidia-modprobe invoked?

Comment 2 Neal Zimmermann 2016-01-10 18:11:34 UTC
Description of problem:
Happens on System boot.

Version-Release number of selected component:
selinux-policy-3.13.1-128.21.fc22.noarch

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.2.8-200.fc22.x86_64
type:           libreport

Comment 3 Rich Fellinger 2016-01-25 20:01:20 UTC
I became aware of this from a desktop notification shortly after installing NVIDIA's driver.  I was never in front of the machine when the notifications poped up.  This happened 2 or three times before I reported this bug.  I do not know how nvidia-modprobe was invoked when this denial occured and I did not see futher occurances of this while fedora 22 was still installed on the machine.  I now have fedora 23 installed and have decided to disable selinux so I don't think I will be able to determine how nvidia-modprobe was invoked when this denial occurs.

This issue should probably be closed.

Comment 4 Miroslav Grepl 2016-01-29 13:29:51 UTC
Please reopen the bug if you know how to reproduce it.


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