Bug 725813 - SELinux is preventing /sbin/xtables-multi from 'read' accesses on the file modprobe.
Summary: SELinux is preventing /sbin/xtables-multi from 'read' accesses on the file mo...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:16f6cbc2738...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-26 16:18 UTC by Eric Blake
Modified: 2011-07-26 18:57 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-26 18:57:58 UTC
Type: ---


Attachments (Terms of Use)

Description Eric Blake 2011-07-26 16:18:02 UTC
SELinux is preventing /sbin/xtables-multi from 'read' accesses on the file modprobe.

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

If you believe that xtables-multi should be allowed read access on the modprobe file 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 ip6tables /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:virtd_t:s0-s0:c0.c1023
Target Context                system_u:object_r:sysctl_modprobe_t:s0
Target Objects                modprobe [ file ]
Source                        ip6tables
Source Path                   /sbin/xtables-multi
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           iptables-1.4.11.1-3.fc16
Target RPM Packages           
Policy RPM                    selinux-policy-3.10.0-4.fc16
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.0-0.rc7.git3.1.fc16.x86_64 #1
                              SMP Fri Jul 15 22:56:12 UTC 2011 x86_64 x86_64
Alert Count                   2
First Seen                    Sun 17 Jul 2011 02:37:11 PM MDT
Last Seen                     Tue 26 Jul 2011 10:08:17 AM MDT
Local ID                      02e3aa7e-987a-4b35-a092-6cd2806d85a2

Raw Audit Messages
type=AVC msg=audit(1311696497.425:44): avc:  denied  { read } for  pid=1149 comm="ip6tables" name="modprobe" dev=proc ino=15753 scontext=system_u:system_r:virtd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sysctl_modprobe_t:s0 tclass=file


type=SYSCALL msg=audit(1311696497.425:44): arch=x86_64 syscall=open success=no exit=EACCES a0=3a30a087d7 a1=0 a2=0 a3=7fff7c78a2c0 items=0 ppid=1148 pid=1149 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=ip6tables exe=/sbin/xtables-multi subj=system_u:system_r:virtd_t:s0-s0:c0.c1023 key=(null)

Hash: ip6tables,virtd_t,sysctl_modprobe_t,file,read

audit2allow

#============= virtd_t ==============
allow virtd_t sysctl_modprobe_t:file read;

audit2allow -R

#============= virtd_t ==============
allow virtd_t sysctl_modprobe_t:file read;

Comment 1 Dominick Grift 2011-07-26 16:47:38 UTC
virtd_t should have domain transitioned to iptables_t. See the following:

rpm -qa | grep selinux-policy
selinux-policy-targeted-3.10.0-9.fc16.noarch

$ ls -alZ /sbin/xtables-multi
-rwxr-xr-x. root root system_u:object_r:iptables_exec_t:s0 /sbin/xtables-multi

$ matchpathcon /sbin/xtables-multi
/sbin/xtables-multi     system_u:object_r:iptables_exec_t:s0

$ sesearch --allow -SCT -s virtd_t -t iptables_exec_t | grep type_transition
   type_transition virtd_t iptables_exec_t : process iptables_t;

please update your selinux-policy and selinux-policy-targeted packages


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