RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1316678 - avc: denied { dac_override } comm="fail2ban-client"
Summary: avc: denied { dac_override } comm="fail2ban-client"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.2
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Simon Sekidde
QA Contact: Jan Zarsky
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-10 18:29 UTC by Orion Poplawski
Modified: 2016-11-04 02:44 UTC (History)
7 users (show)

Fixed In Version: selinux-policy-3.13.1-83.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 02:44:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2283 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2016-11-03 13:36:25 UTC

Description Orion Poplawski 2016-03-10 18:29:22 UTC
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 08:18:35 UTC
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 19:02:28 UTC
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 20:01:38 UTC
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 06:39:56 UTC
Any chance you see also a SYSCALL part of the audit message?

Comment 6 Orion Poplawski 2016-03-31 14:25:50 UTC
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 11:47:25 UTC
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 20:54:30 UTC
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 12:41:51 UTC
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-04 02:44:36 UTC
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.