Description of problem: Hello, This error has occured when restarting munin-node service after enabling fail2ban module in /etc/munin/plugins/fail2ban. I am using fail2ban-0.9-2.fc20, munin-node-2.0.21-1.fc20 and selinux-policy-3.12.1-182.fc20. Thanks to solve it. SELinux is preventing /usr/bin/bash from 'getattr' accesses on the file . ***** Plugin catchall (100. confidence) suggests ************************** If vous pensez que bash devrait être autorisé à accéder getattr sur file par défaut. Then vous devriez rapporter ceci en tant qu'anomalie. Vous pouvez générer un module de stratégie local pour autoriser cet accès. Do autoriser cet accès pour le moment en exécutant : # grep fail2ban /var/log/audit/audit.log | audit2allow -M mypol # semodule -i mypol.pp Additional Information: Source Context system_u:system_r:services_munin_plugin_t:s0 Target Context system_u:object_r:fail2ban_client_exec_t:s0 Target Objects [ file ] Source fail2ban Source Path /usr/bin/bash Port <Unknown> Host (removed) Source RPM Packages bash-4.2.47-3.fc20.x86_64 Target RPM Packages Policy RPM selinux-policy-3.12.1-182.fc20.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 3.15.10-201.fc20.x86_64 #1 SMP Wed Aug 27 21:10:06 UTC 2014 x86_64 x86_64 Alert Count 3 First Seen 2014-09-09 10:59:19 CEST Last Seen 2014-09-09 11:00:01 CEST Local ID 686664db-5ad9-497a-98f4-c7794d537459 Raw Audit Messages type=AVC msg=audit(1410253201.696:3168): avc: denied { getattr } for pid=28887 comm="fail2ban" path="/usr/bin/fail2ban-client" dev="dm-0" ino=2236640 scontext=system_u:system_r:services_munin_plugin_t:s0 tcontext=system_u:object_r:fail2ban_client_exec_t:s0 tclass=file type=SYSCALL msg=audit(1410253201.696:3168): arch=x86_64 syscall=stat success=no exit=EACCES a0=124f810 a1=7fff6eb38090 a2=7fff6eb38090 a3=7fff6eb37f20 items=0 ppid=28885 pid=28887 auid=4294967295 uid=99 gid=99 euid=99 suid=99 fsuid=99 egid=99 sgid=99 fsgid=99 tty=(none) ses=4294967295 comm=fail2ban exe=/usr/bin/bash subj=system_u:system_r:services_munin_plugin_t:s0 key=(null) Hash: fail2ban,services_munin_plugin_t,fail2ban_client_exec_t,file,getattr Additional info: reporter: libreport-2.2.3 hashmarkername: setroubleshoot kernel: 3.15.10-201.fc20.x86_64 type: libreport
*** Bug 1139597 has been marked as a duplicate of this bug. ***
*** Bug 1139587 has been marked as a duplicate of this bug. ***
commit f1f596169585edc293066d0e1697da5d7866db9e Author: Miroslav Grepl <mgrepl> Date: Tue Sep 9 16:00:28 2014 +0200 Allow munin services plugins to execute fail2ban-client in fail2ban_client_t domain.
commit f2d7b6cb7e83f65c96c569e19b81996f380ad0f7 Author: Miroslav Grepl <mgrepl> Date: Tue Sep 9 16:00:28 2014 +0200 Allow munin services plugins to execute fail2ban-client in fail2ban_client_t domain. https://github.com/selinux-policy/selinux-policy/commit/f2d7b6cb7e83f65c96c569e19b81996f380ad0f7
Hello, Here are more infos. Even with the following selinux rules added, munin is displaying an empty graph for fail2ban. However it works with selinux disabled. #============= httpd_munin_script_t ============== allow httpd_munin_script_t self:process execmem; #============= munin_t ============== allow munin_t self:capability net_admin; allow munin_t self:process execmem; #============= services_munin_plugin_t ============== allow services_munin_plugin_t fail2ban_client_exec_t:file { ioctl execute read o pen getattr execute_no_trans }; allow services_munin_plugin_t fail2ban_t:unix_stream_socket connectto; allow services_munin_plugin_t fail2ban_var_run_t:sock_file write; grep munin /var/log/audit/audit.log | audit2allow -M munin-gul ; more munin-gul.te gives me nothing more You will find below the lines added by munin-cron in /var/log/audit/audit.log with setenforce 1 and with setenforce 0 after munin-node service restart. I am also providing the corresponding lines in /var/log/munin-node/munin-node.log Cheers,
Created attachment 936314 [details] munin-cron added lines in /var/log/audit/audit.log with setenforce 1
Created attachment 936316 [details] munin-cron added lines in /var/log/audit/audit.log with setenforce 0
Created attachment 936317 [details] munin-cron added lines in /var/log/munin-node/munin-node.log
selinux-policy-3.12.1-186.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-186.fc20
Package selinux-policy-3.12.1-186.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-186.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-11479/selinux-policy-3.12.1-186.fc20 then log in and leave karma (feedback).
selinux-policy-3.12.1-187.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-187.fc20
Hello, After updating to selinux-policy-3.12.1.186.fc20, I got several selinux errors solved with allow fail2ban_client_t munin_t:fifo_file { write getattr ioctl }; allow fail2ban_client_t munin_t:tcp_socket { ioctl getattr }; Cheers,
Hi, Could you paste here your actual AVC list? Thank you.
Created attachment 942289 [details] grep munin /var/log/audit/audit.log | grep AVC > munin-audit.log Hi, Here are the requested AVC after a reboot using permissive mode Cheers
selinux-policy-3.12.1-188.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-188.fc20
Package selinux-policy-3.12.1-188.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-188.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-11932/selinux-policy-3.12.1-188.fc20 then log in and leave karma (feedback).
Created attachment 943763 [details] grep 1412356 /var/log/audit/audit.log | grep munin | grep AVC > munin-AVC.log Hi, after updating to selinux-policy-3.12.1-188.fc20, full selinux relabel and reboot, I still have the following errors concerning munin. #============= fail2ban_client_t ============== allow fail2ban_client_t munin_t:fifo_file { write getattr ioctl }; allow fail2ban_client_t munin_t:tcp_socket { ioctl getattr }; #============= munin_t ============== allow munin_t self:capability net_admin; allow munin_t self:process execmem; audit.log has been restricted to the relevant date. Cheers
This message is a reminder that Fedora 20 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 20. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '20'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 20 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.