Bug 967778 - SELinux is preventing /usr/sbin/iscsid from 'search' accesses on the directory /usr/lib/modules.
SELinux is preventing /usr/sbin/iscsid from 'search' accesses on the director...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-05-28 06:11 EDT by David Jaša
Modified: 2013-06-24 08:08 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-06-24 08:08:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
full yum.log (34.10 KB, text/plain)
2013-05-29 05:37 EDT, David Jaša
no flags Details

  None (edit)
Description David Jaša 2013-05-28 06:11:20 EDT
Description of problem:
The problem occurs when iscsid is logging to a target. Discovery works OK. F19 Beta was not affected by this bug.
SELinux is preventing /usr/sbin/iscsid from 'search' accesses on the directory /usr/lib/modules.

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

If you believe that iscsid 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.
allow this access for now by executing:
# grep iscsid /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:iscsid_t:s0
Target Context                system_u:object_r:modules_object_t:s0
Target Objects                /usr/lib/modules [ dir ]
Source                        iscsid
Source Path                   /usr/sbin/iscsid
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           iscsi-initiator-utils-
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-44.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.4-300.fc19.x86_64 #1 SMP Fri
                              May 24 22:17:06 UTC 2013 x86_64 x86_64
Alert Count                   7
First Seen                    2013-05-28 11:28:17 CEST
Last Seen                     2013-05-28 12:05:31 CEST
Local ID                      261d9b42-ed9b-4728-91f2-7e44b5ec6773

Raw Audit Messages
type=AVC msg=audit(1369735531.305:591): avc:  denied  { search } for  pid=3221 comm="iscsid" name="modules" dev="dm-0" ino=538740 scontext=system_u:system_r:iscsid_t:s0 tcontext=system_u:object_r:modules_object_t:s0 tclass=dir

type=SYSCALL msg=audit(1369735531.305:591): arch=x86_64 syscall=open success=no exit=EACCES a0=7fffbec30ea0 a1=80000 a2=1b6 a3=0 items=0 ppid=1 pid=3221 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=iscsid exe=/usr/sbin/iscsid subj=system_u:system_r:iscsid_t:s0 key=(null)

Hash: iscsid,iscsid_t,modules_object_t,dir,search

Additional info:
reporter:       libreport-2.1.4
hashmarkername: setroubleshoot
kernel:         3.9.4-300.fc19.x86_64
type:           libreport
Comment 1 David Jaša 2013-05-28 06:26:05 EDT
'restorecon -FR /lib/modules' has fixed the issue for me
Comment 2 Miroslav Grepl 2013-05-29 05:02:30 EDT
Ok, the question is how it got mislabeling. Is it a fresh install?
Comment 3 David Jaša 2013-05-29 05:37:28 EDT
The fresh install of F19 RC4 (that was subsequently declared beta) was fine, the problem occurred after I updated the system yesterday (with updates-testing enabled IIRC). I'll attach full yum.log for reference.
Comment 4 David Jaša 2013-05-29 05:37:56 EDT
Created attachment 754275 [details]
full yum.log
Comment 5 Daniel Walsh 2013-05-29 17:28:32 EDT
I guess the other question is there a reason they are labeled incorrectly.  Rebuilding a kernel could cause the problem.
Comment 6 Miroslav Grepl 2013-05-31 03:43:31 EDT
AFAIK we had this issue on RHEL and we have reproducer for this?
Comment 7 Miroslav Grepl 2013-05-31 03:44:33 EDT
are you able to get it again?
Comment 8 David Jaša 2013-05-31 04:00:34 EDT
I didn't get it again on the same machine, should I try to reproduce with another one, including the installation of Beta and upgrade?
Comment 9 Miroslav Grepl 2013-06-04 08:00:09 EDT
Yes, please. Thank you.
Comment 10 Miroslav Grepl 2013-06-24 08:08:21 EDT
#============= iscsid_t ==============

#!!!! This avc is allowed in the current policy
allow iscsid_t modules_object_t:dir search;

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