Bug 1103585

Summary: logrotate of fail2ban raise selinux alert
Product: [Fedora] Fedora Reporter: Miroslav Suchý <msuchy>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: Axel.Thimm, dominick.grift, dwalsh, lvrabec, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: selinux-policy-3.12.1-171.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-26 01:53:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Miroslav Suchý 2014-06-02 07:16:59 UTC
Description of problem:
Today I found new 'denied' entry in audit.log from this night. It was very likely caused by logrotate of fail2ban.

Version-Release number of selected component (if applicable):
fail2ban-0.8.11-2.fc19.noarch
selinux-policy-3.12.1-74.19.fc19.noarch

How reproducible:
happened once

Steps to Reproduce:
1. trigger fail2ban logrotate

Additional Information:
Source Context                system_u:system_r:logrotate_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:fail2ban_client_exec_t:s0
Target Objects                 [ file ]
Source                        fail2ban-client
Source Path                   /usr/bin/python2.7
Port                          <Unknown>
Host                          <Unknown>
Source RPM Packages           python-2.7.5-11.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-166.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     copr-fe-dev.cloud.fedoraproject.org
Platform                      Linux copr-fe-dev.cloud.fedoraproject.org
                              3.14.4-200.fc20.x86_64 #1 SMP Tue May 13 13:51:08
                              UTC 2014 x86_64 x86_64
Alert Count                   1
First Seen                    2014-06-01 03:27:48 UTC
Last Seen                     2014-06-01 03:27:48 UTC
Local ID                      e82dddf8-0589-4aef-a2fa-b461fa9e9ea9

Raw Audit Messages
type=AVC msg=audit(1401593268.483:50334): avc:  denied  { ioctl } for  pid=10225 comm="fail2ban-client" path="/usr/bin/fail2ban-client" dev="vda1" ino=25526 scontext=system_u:system_r:logrotate_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:fail2ban_client_exec_t:s0 tclass=file


type=SYSCALL msg=audit(1401593268.483:50334): arch=x86_64 syscall=ioctl success=no exit=ENOTTY a0=3 a1=5401 a2=7fff10cf3720 a3=7fff10cf35b0 items=0 ppid=10223 pid=10225 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=101 comm=fail2ban-client exe=/usr/bin/python2.7 subj=system_u:system_r:logrotate_t:s0-s0:c0.c1023 key=(null)

Comment 1 Miroslav Suchý 2014-06-02 07:19:31 UTC
And the same client had also this entries one day before:

Additional Information:
Source Context                system_u:system_r:logrotate_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:fail2ban_client_exec_t:s0
Target Objects                 [ file ]
Source                        fail2ban-client
Source Path                   /usr/bin/python2.7
Port                          <Unknown>
Host                          <Unknown>
Source RPM Packages           python-2.7.5-11.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-166.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     copr-fe-dev.cloud.fedoraproject.org
Platform                      Linux copr-fe-dev.cloud.fedoraproject.org
                              3.14.4-200.fc20.x86_64 #1 SMP Tue May 13 13:51:08
                              UTC 2014 x86_64 x86_64
Alert Count                   1
First Seen                    2014-05-31 03:17:55 UTC
Last Seen                     2014-05-31 03:17:55 UTC
Local ID                      a0f5aafd-d251-44f7-aced-27d54246d6f6

Raw Audit Messages
type=AVC msg=audit(1401506275.927:33326): avc:  denied  { execute } for  pid=8501 comm="sh" name="fail2ban-client" dev="vda1" ino=25526 scontext=system_u:system_r:logrotate_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:fail2ban_client_exec_t:s0 tclass=file


type=AVC msg=audit(1401506275.927:33326): avc:  denied  { read open } for  pid=8501 comm="sh" path="/usr/bin/fail2ban-client" dev="vda1" ino=25526 scontext=system_u:system_r:logrotate_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:fail2ban_client_exec_t:s0 tclass=file


type=AVC msg=audit(1401506275.927:33326): avc:  denied  { execute_no_trans } for  pid=8501 comm="sh" path="/usr/bin/fail2ban-client" dev="vda1" ino=25526 scontext=system_u:system_r:logrotate_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:fail2ban_client_exec_t:s0 tclass=file


type=SYSCALL msg=audit(1401506275.927:33326): arch=x86_64 syscall=execve success=yes exit=0 a0=25f4430 a1=25f34d0 a2=25f3060 a3=7fff7e022690 items=0 ppid=8500 pid=8501 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=67 comm=fail2ban-client exe=/usr/bin/python2.7 subj=system_u:system_r:logrotate_t:s0-s0:c0.c1023 key=(null)

Comment 2 Fedora Update System 2014-06-09 20:09:17 UTC
selinux-policy-3.12.1-167.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-167.fc20

Comment 3 Fedora Update System 2014-06-11 16:25:32 UTC
Package selinux-policy-3.12.1-167.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-167.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-7240/selinux-policy-3.12.1-167.fc20
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2014-06-19 13:18:57 UTC
selinux-policy-3.12.1-171.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-171.fc20

Comment 5 Fedora Update System 2014-06-19 22:53:07 UTC
Package selinux-policy-3.12.1-171.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-171.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-7499/selinux-policy-3.12.1-171.fc20
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2014-06-26 01:53:47 UTC
selinux-policy-3.12.1-171.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.