Bug 1316678 - avc: denied { dac_override } comm="fail2ban-client"
avc: denied { dac_override } comm="fail2ban-client"
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy (Show other bugs)
7.2
All Linux
low Severity low
: rc
: ---
Assigned To: Simon Sekidde
Jan Zarsky
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-10 13:29 EST by Orion Poplawski
Modified: 2016-11-03 22:44 EDT (History)
7 users (show)

See Also:
Fixed In Version: selinux-policy-3.13.1-83.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-03 22:44:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Orion Poplawski 2016-03-10 13:29:22 EST
Description of problem:

systemctl start/restart fail2ban results in:

type=AVC msg=audit(1457624787.403:248): avc:  denied  { dac_override } for  pid=18363 comm="fail2ban-client" capability=1  scontext=system_u:system_r:fail2ban_client_t:s0 tcontext=system_u:system_r:fail2ban_client_t:s0 tclass=capability


Version-Release number of selected component (if applicable):
selinux-policy-3.13.1-60.el7_2.3.noarch

This appears to be fixed in selinux-policy-3.13.1-158.9.fc23.noarch.
Comment 2 Miroslav Grepl 2016-03-14 04:18:35 EDT
Could you try to turn the full auditing on?

# echo "-w /etc/shadow -p w" >> /etc/audit/audit.rules
# systemctl reload auditd

and reproduce it and attach AVC? 

Thank you.
Comment 3 Orion Poplawski 2016-03-23 15:02:28 EDT
Still the same, although I get two at a time:

type=AVC msg=audit(1458759692.434:727): avc:  denied  { dac_override } for  pid=11037 comm="fail2ban-client" capability=1  scontext=system_u:system_r:fail2ban_client_t:s0 tcontext=system_u:system_r:fail2ban_client_t:s0 tclass=capability
type=AVC msg=audit(1458759692.434:728): avc:  denied  { dac_override } for  pid=11037 comm="fail2ban-client" capability=1  scontext=system_u:system_r:fail2ban_client_t:s0 tcontext=system_u:system_r:fail2ban_client_t:s0 tclass=capability
Comment 4 Orion Poplawski 2016-03-23 16:01:38 EDT
After a reboot, also saw:

type=AVC msg=audit(1458763089.252:871): avc:  denied  { net_admin } for  pid=27651 comm="firewall-cmd" capability=12  scontext=system_u:system_r:fail2ban_t:s0 tcontext=system_u:system_r:fail2ban_t:s0 tclass=capability
Comment 5 Miroslav Grepl 2016-03-31 02:39:56 EDT
Any chance you see also a SYSCALL part of the audit message?
Comment 6 Orion Poplawski 2016-03-31 10:25:50 EDT
Ah, yes, sorry used to just searching for denial messages:

type=AVC msg=audit(1459434281.689:1219): avc:  denied  { dac_override } for  pid=11539 comm="fail2ban-client" capability=1  scontext=system_u:system_r:fail2ban_client_t:s0 tcontext=system_u:system_r:fail2ban_client_t:s0 tclass=capability
type=SYSCALL msg=audit(1459434281.689:1219): arch=c000003e syscall=6 success=yes exit=0 a0=24b78e0 a1=7ffd87faf0d0 a2=7ffd87faf0d0 a3=3 items=0 ppid=1 pid=11539 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="fail2ban-client" exe="/usr/bin/python2.7" subj=system_u:system_r:fail2ban_client_t:s0 key=(null)
type=AVC msg=audit(1459434281.689:1220): avc:  denied  { dac_override } for  pid=11539 comm="fail2ban-client" capability=1  scontext=system_u:system_r:fail2ban_client_t:s0 tcontext=system_u:system_r:fail2ban_client_t:s0 tclass=capability
type=SYSCALL msg=audit(1459434281.689:1220): arch=c000003e syscall=4 success=yes exit=0 a0=24b78e0 a1=7ffd87faf490 a2=7ffd87faf490 a3=0 items=0 ppid=1 pid=11539 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="fail2ban-client" exe="/usr/bin/python2.7" subj=system_u:system_r:fail2ban_client_t:s0 key=(null)
type=SERVICE_START msg=audit(1459434282.018:1221): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=fail2ban comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
type=NETFILTER_CFG msg=audit(1459434282.272:1222): table=filter family=2 entries=93
type=SYSCALL msg=audit(1459434282.272:1222): arch=c000003e syscall=54 success=yes exit=0 a0=4 a1=0 a2=40 a3=16d92e0 items=0 ppid=703 pid=11588 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)
Comment 7 Lukas Vrabec 2016-04-04 07:47:25 EDT
Could you follow comment2, then reproduce the issue and attach AVC and SYSCALL msgs? 
I believe some of files on your system have too tight permission flags.

Thank you
Comment 8 Orion Poplawski 2016-05-02 16:54:30 EDT
type=AVC msg=audit(1462222429.189:8573): avc:  denied  { dac_override } for  pid=7501 comm="fail2ban-client" capability=1  scontext=system_u:system_r:fail2ban_client_t:s0 tcontext=system_u:system_r:fail2ban_client_t:s0 tclass=capability
type=SYSCALL msg=audit(1462222429.189:8573): arch=c000003e syscall=6 success=yes exit=0 a0=1ad2980 a1=7ffee77b6de0 a2=7ffee77b6de0 a3=3 items=0 ppid=1 pid=7501 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="fail2ban-client" exe="/usr/bin/python2.7" subj=system_u:system_r:fail2ban_client_t:s0 key=(null)
type=AVC msg=audit(1462222429.190:8574): avc:  denied  { dac_override } for  pid=7501 comm="fail2ban-client" capability=1  scontext=system_u:system_r:fail2ban_client_t:s0 tcontext=system_u:system_r:fail2ban_client_t:s0 tclass=capability
type=SYSCALL msg=audit(1462222429.190:8574): arch=c000003e syscall=4 success=yes exit=0 a0=1ad2980 a1=7ffee77b71a0 a2=7ffee77b71a0 a3=0 items=0 ppid=1 pid=7501 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="fail2ban-client" exe="/usr/bin/python2.7" subj=system_u:system_r:fail2ban_client_t:s0 key=(null)
type=SERVICE_START msg=audit(1462222429.745:8575): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=fail2ban comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
type=NETFILTER_CFG msg=audit(1462222430.449:8576): table=filter family=2 entries=93
type=SYSCALL msg=audit(1462222430.449:8576): arch=c000003e syscall=54 success=yes exit=0 a0=4 a1=0 a2=40 a3=b922e0 items=0 ppid=659 pid=7814 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)
Comment 11 Jan Zarsky 2016-09-05 08:41:51 EDT
I could not reproduce this bug on RHEL-7.2, so I added a testphase in /CoreOS/selinux-policy/Regression/fail2ban-and-similar which just checks for proper allow rule.
Comment 14 errata-xmlrpc 2016-11-03 22:44:36 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2283.html

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