Bug 967778 - SELinux is preventing /usr/sbin/iscsid from 'search' accesses on the directory /usr/lib/modules.
Summary: SELinux is preventing /usr/sbin/iscsid from 'search' accesses on the director...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 19
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:0a4ec7012879c82d4f876c8db9a...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-28 10:11 UTC by David Jaša
Modified: 2013-06-24 12:08 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-24 12:08:21 UTC
Type: ---
Embargoed:


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

Description David Jaša 2013-05-28 10:11:20 UTC
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.
Do
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-6.2.0.873-5.fc19.x86_64
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 10:26:05 UTC
'restorecon -FR /lib/modules' has fixed the issue for me

Comment 2 Miroslav Grepl 2013-05-29 09:02:30 UTC
Ok, the question is how it got mislabeling. Is it a fresh install?

Comment 3 David Jaša 2013-05-29 09:37:28 UTC
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 09:37:56 UTC
Created attachment 754275 [details]
full yum.log

Comment 5 Daniel Walsh 2013-05-29 21:28:32 UTC
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 07:43:31 UTC
Milos,
AFAIK we had this issue on RHEL and we have reproducer for this?

Comment 7 Miroslav Grepl 2013-05-31 07:44:33 UTC
David,
are you able to get it again?

Comment 8 David Jaša 2013-05-31 08:00:34 UTC
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 12:00:09 UTC
Yes, please. Thank you.

Comment 10 Miroslav Grepl 2013-06-24 12:08:21 UTC
#============= 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.