Bug 917157
Summary: | SELinux blocks Nagios/NRPE plugins which use sudo | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | James Ralston <ralston> | |
Component: | selinux-policy | Assignee: | Miroslav Grepl <mgrepl> | |
Status: | CLOSED ERRATA | QA Contact: | Michal Trunecka <mtruneck> | |
Severity: | unspecified | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 6.4 | CC: | dwalsh, ebenes, jasonmc, lehn, mmalik, mtruneck, qe-baseos-security | |
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | selinux-policy-3.7.19-210.el6 | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1230670 (view as bug list) | Environment: | ||
Last Closed: | 2013-11-21 10:18:43 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: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1212796 |
Description
James Ralston
2013-03-01 21:10:58 UTC
Would this policy work? dontaudit nrpe_t self:capability audit_write; dontaudit nrpe_t self:netlink_audit_socket { nlmsg_relay create }; can_exec(nrpe_t, sudo_exec_t) Hmmm. I created a module to implement the above policy. It almost works, but sudo fails unless it can call sys_ptrace: type=SYSCALL msg=audit(1362463802.168:100485): arch=c000003e syscall=0 success=yes exit=225 a0=3 a1=7f4904602000 a2=400 a3=22 items=0 ppid=4361 pid=4362 auid=20576 uid=497 gid=497 euid=0 suid=0 fsuid=0 egid=497 sgid=497 fsgid=497 tty=(none) ses=2533 comm="sudo" exe="/usr/bin/sudo" subj=system_u:system_r:nrpe_t:s0 key=(null) type=AVC msg=audit(1362463802.168:100485): avc: denied { sys_ptrace } for pid=4362 comm="sudo" capability=19 scontext=system_u:system_r:nrpe_t:s0 tcontext=system_u:system_r:nrpe_t:s0 tclass=capability If I change the policy to: allow nrpe_t self:capability sys_ptrace; dontaudit nrpe_t self:capability audit_write; dontaudit nrpe_t self:netlink_audit_socket { nlmsg_relay create }; can_exec(nrpe_t, sudo_exec_t) ...then I see no avc denials. I'm not sure why sudo needs ptrace, but in enforcing mode, it fails if it doesn't have it. Is it possible to get the hotfixed version selinux-policy-3.7.19-210.el6 ? (In reply to Milos Malik from comment #5) > http://people.redhat.com/dwalsh/SELinux/RHEL6/noarch/ Thanks for the url. Version selinux-policy-targeted-3.7.19-211.el6 works for me. I hope to see an official update during the next days. That is the package that should be in RHEL6.5 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. http://rhn.redhat.com/errata/RHBA-2013-1598.html |