Bug 1147709

Summary: SELinux is preventing /usr/sbin/xtables-multi from 'read' accesses on the file .
Product: [Fedora] Fedora Reporter: Kristjan Stefansson <hk.stefansson>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: dominick.grift, dwalsh, lvrabec, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:c982f6622211a9e16a7142ea98cb80091efa91d1be665fd05bdb72ddce809002
Fixed In Version: selinux-policy-3.12.1-189.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-16 02:00:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kristjan Stefansson 2014-09-29 22:58:36 UTC
Description of problem:
SELinux is preventing /usr/sbin/xtables-multi from 'read' accesses on the file .

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

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

Additional Information:
Source Context                system_u:system_r:iptables_t:s0
Target Context                system_u:object_r:fail2ban_log_t:s0
Target Objects                 [ file ]
Source                        iptables
Source Path                   /usr/sbin/xtables-multi
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           iptables-1.4.19.1-1.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-187.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.16.3-200.fc20.x86_64 #1 SMP Wed
                              Sep 17 22:34:21 UTC 2014 x86_64 x86_64
Alert Count                   1
First Seen                    2014-09-29 22:49:13 GMT
Last Seen                     2014-09-29 22:49:13 GMT
Local ID                      62cee05f-abda-46f2-98b1-9e015955e8a9

Raw Audit Messages
type=AVC msg=audit(1412030953.250:12308): avc:  denied  { read } for  pid=15712 comm="iptables" path="/var/log/fail2ban.log" dev="dm-3" ino=2756247 scontext=system_u:system_r:iptables_t:s0 tcontext=system_u:object_r:fail2ban_log_t:s0 tclass=file permissive=0


type=SYSCALL msg=audit(1412030953.250:12308): arch=x86_64 syscall=execve success=yes exit=0 a0=165bbd0 a1=165c1d0 a2=165aae0 a3=8 items=0 ppid=15711 pid=15712 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=iptables exe=/usr/sbin/xtables-multi subj=system_u:system_r:iptables_t:s0 key=(null)

Hash: iptables,iptables_t,fail2ban_log_t,file,read

Additional info:
reporter:       libreport-2.2.3
hashmarkername: setroubleshoot
kernel:         3.16.3-200.fc20.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2014-10-07 11:32:29 UTC
commit 6ef5ad611a4416ec551a024b4aeee42e345028a8
Author: Lukas Vrabec <lvrabec>
Date:   Tue Oct 7 13:30:57 2014 +0200

    Allow iptables read fail2ban logs. BZ (1147709)

https://github.com/selinux-policy/selinux-policy/commit/6ef5ad611a4416ec551a024b4aeee42e345028a8

Comment 2 Fedora Update System 2014-10-07 13:36:32 UTC
selinux-policy-3.12.1-189.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-189.fc20

Comment 3 Fedora Update System 2014-10-08 19:02:28 UTC
Package selinux-policy-3.12.1-189.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-189.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-12350/selinux-policy-3.12.1-189.fc20
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2014-10-16 02:00:58 UTC
selinux-policy-3.12.1-189.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.