Bug 1039337

Summary: SELinux is preventing /usr/bin/kmod from 'search' accesses on the directory /usr/lib/modules.
Product: [Fedora] Fedora Reporter: nuno ferreira <self>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: blazej.nowak, dev, dominick.grift, dwalsh, lvrabec, mgrepl, patrick.trentin.88, sayak.bugsmith
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:76caaf564dc68df3633272b04bb4a9fd097610980c1e5ef49077eecd4f5dd40e
Fixed In Version: selinux-policy-3.12.1-116.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-16 07:09:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description nuno ferreira 2013-12-08 11:21:01 UTC
Description of problem:
SELinux is preventing /usr/bin/kmod from 'search' accesses on the directory /usr/lib/modules.

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

If you believe that kmod should be allowed search access on the modules 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 modprobe /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:bumblebee_t:s0
Target Context                system_u:object_r:modules_object_t:s0
Target Objects                /usr/lib/modules [ dir ]
Source                        modprobe
Source Path                   /usr/bin/kmod
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           kmod-15-1.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-105.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.11.10-300.fc20.x86_64 #1 SMP Fri
                              Nov 29 19:16:48 UTC 2013 x86_64 x86_64
Alert Count                   9
First Seen                    2013-12-06 19:16:25 WET
Last Seen                     2013-12-08 11:20:00 WET
Local ID                      cefc815a-0908-491e-ae8c-ad6a81924b56

Raw Audit Messages
type=AVC msg=audit(1386501600.403:640): avc:  denied  { search } for  pid=6304 comm="modprobe" name="modules" dev="dm-1" ino=2097179 scontext=system_u:system_r:bumblebee_t:s0 tcontext=system_u:object_r:modules_object_t:s0 tclass=dir


type=AVC msg=audit(1386501600.403:640): avc:  denied  { read } for  pid=6304 comm="modprobe" name="modules.dep.bin" dev="dm-1" ino=2492798 scontext=system_u:system_r:bumblebee_t:s0 tcontext=system_u:object_r:modules_object_t:s0 tclass=file


type=AVC msg=audit(1386501600.403:640): avc:  denied  { open } for  pid=6304 comm="modprobe" path="/usr/lib/modules/3.11.10-300.fc20.x86_64/modules.dep.bin" dev="dm-1" ino=2492798 scontext=system_u:system_r:bumblebee_t:s0 tcontext=system_u:object_r:modules_object_t:s0 tclass=file


type=SYSCALL msg=audit(1386501600.403:640): arch=x86_64 syscall=open success=yes exit=ESRCH a0=7fffb3c30380 a1=80000 a2=2151550 a3=3 items=0 ppid=6302 pid=6304 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=modprobe exe=/usr/bin/kmod subj=system_u:system_r:bumblebee_t:s0 key=(null)

Hash: modprobe,bumblebee_t,modules_object_t,dir,search

Additional info:
reporter:       libreport-2.1.9
hashmarkername: setroubleshoot
kernel:         3.11.10-300.fc20.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2013-12-09 10:02:06 UTC
commit 4b26b7506948aa738585ae4ad56dcf7d9033bf7c
Author: Miroslav Grepl <mgrepl>
Date:   Mon Dec 9 11:01:51 2013 +0100

    Dontaudit access check on /proc for bumblebee

commit 4296386a26ff7693fd98b5be8aac18d5ae4ddbf8
Author: Miroslav Grepl <mgrepl>
Date:   Mon Dec 9 10:54:47 2013 +0100

    bumblebee wants to load nvidia modules

Comment 2 Illya 2014-01-07 10:16:20 UTC
Description of problem:
Try to install "Bumblebee with the NVIDIA proprietary drivers" following this manual https://fedoraproject.org/wiki/Bumblebee.

Additional info:
reporter:       libreport-2.1.10
hashmarkername: setroubleshoot
kernel:         3.12.6-300.fc20.x86_64
type:           libreport

Comment 3 Fedora Update System 2014-01-13 22:55:29 UTC
selinux-policy-3.12.1-116.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-116.fc20

Comment 4 Fedora Update System 2014-01-15 05:57:05 UTC
Package selinux-policy-3.12.1-116.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.12.1-116.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-0806/selinux-policy-3.12.1-116.fc20
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2014-01-16 07:09:39 UTC
selinux-policy-3.12.1-116.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.