Bug 466470 - avc: denied { getsched } for pid=12121 comm="snmpd" ...
avc: denied { getsched } for pid=12121 comm="snmpd" ...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy (Show other bugs)
5.3
All Linux
medium Severity medium
: rc
: ---
Assigned To: Daniel Walsh
BaseOS QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-10 08:54 EDT by Milos Malik
Modified: 2012-10-15 09:44 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-20 16:31:06 EST
Type: ---
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 Milos Malik 2008-10-10 08:54:11 EDT
Description of problem:
During testing of selinux-policy on nightly builds of RHEL-5.3 some of my tests failed. They had the same issue -- SELinux denial when starting snmpd.

Version-Release number of selected component (if applicable):
net-snmp-libs-5.3.2.2-4.el5
net-snmp-5.3.2.2-4.el5
net-snmp-utils-5.3.2.2-4.el5
selinux-policy-2.4.6-164.el5
selinux-policy-devel-2.4.6-164.el5
selinux-policy-targeted-2.4.6-164.el5

How reproducible:
always

Steps to Reproduce:
# /etc/init.d/snmpd start
Starting snmpd: [  OK  ]
# ausearch -m AVC -ts recent
----
time->Fri Oct 10 08:42:33 2008
type=SYSCALL msg=audit(1223642553.353:293): arch=40000003 syscall=155 success=no exit=-13 a0=2f59 a1=b7f768dc a2=4bdff4 a3=b7f766d0 items=0 ppid=1 pid=12121 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm="snmpd" exe="/usr/sbin/snmpd" subj=root:system_r:snmpd_t:s0 key=(null)
type=AVC msg=audit(1223642553.353:293): avc:  denied  { getsched } for  pid=12121 comm="snmpd" scontext=root:system_r:snmpd_t:s0 tcontext=root:system_r:snmpd_t:s0 tclass=process
----
time->Fri Oct 10 08:42:33 2008
type=SYSCALL msg=audit(1223642553.353:294): arch=40000003 syscall=157 success=no exit=-13 a0=2f59 a1=ffffffcc a2=4bdff4 a3=b7f766d0 items=0 ppid=1 pid=12121 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm="snmpd" exe="/usr/sbin/snmpd" subj=root:system_r:snmpd_t:s0 key=(null)
type=AVC msg=audit(1223642553.353:294): avc:  denied  { getsched } for  pid=12121 comm="snmpd" scontext=root:system_r:snmpd_t:s0 tcontext=root:system_r:snmpd_t:s0 tclass=process
# /etc/init.d/snmpd stop
Stopping snmpd: [  OK  ]
# sesearch -s snmpd_t -t snmpd_t -a | grep getsched
# 
  
Actual results:
SELinux denial during start of snmpd

Expected results:
no SELinux denial during start of snmpd

Additional info:
Comment 2 Daniel Walsh 2008-10-15 14:58:30 EDT
Fixed in selinux-policy-2.4.6-166.el5
Comment 3 Milos Malik 2008-10-16 11:16:22 EDT
The previous AVCs (2 getsched operations) appeared in enforcing mode. Today I have extended the test for permissive mode and I got following AVCs (1 getsched + 1 setsched operation). Dan, could you please look at it.

RHEL5.3-Server-20081015.nightly

selinux-policy-2.4.6-165.el5
selinux-policy-devel-2.4.6-165.el5
selinux-policy-targeted-2.4.6-165.el5
net-snmp-utils-5.3.2.2-4.el5
net-snmp-libs-5.3.2.2-4.el5
net-snmp-5.3.2.2-4.el5
policycoreutils-1.33.12-14.1.el5

How to reproduce:
# setenforce 0
# /etc/init.d/snmpd start
Starting snmpd: [  OK  ]
# /etc/init.d/snmpd stop
Stopping snmpd: [  OK  ]
# ausearch -ts recent -m AVC
----
time->Thu Oct 16 11:04:22 2008
type=SYSCALL msg=audit(1224169462.799:256): arch=14 syscall=155 success=yes ex
it=0 a0=76be a1=f7fe8c34 a2=ff82d358 a3=0 items=0 ppid=1 pid=30398 auid=0 uid=
0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=7 comm="snm
pd" exe="/usr/sbin/snmpd" subj=root:system_r:snmpd_t:s0 key=(null)
type=AVC msg=audit(1224169462.799:256): avc:  denied  { getsched } for  pid=30
398 comm="snmpd" scontext=root:system_r:snmpd_t:s0 tcontext=root:system_r:snmp
d_t:s0 tclass=process
----
time->Thu Oct 16 11:04:22 2008
type=SYSCALL msg=audit(1224169462.800:257): arch=14 syscall=156 success=yes ex
it=0 a0=76be a1=0 a2=ff82d358 a3=0 items=0 ppid=1 pid=30398 auid=0 uid=0 gid=0
 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=7 comm="snmpd" exe
="/usr/sbin/snmpd" subj=root:system_r:snmpd_t:s0 key=(null)
type=AVC msg=audit(1224169462.800:257): avc:  denied  { setsched } for  pid=30
398 comm="snmpd" scontext=root:system_r:snmpd_t:s0 tcontext=root:system_r:snmp
d_t:s0 tclass=process
Comment 5 Daniel Walsh 2008-10-16 14:59:14 EDT
I see this in the package.

If you 

# sesearch --allow | grep snmpd_t | grep setsched

What does it return?
Comment 6 Daniel Walsh 2008-10-16 16:04:37 EDT
I said it was fixed in selinux-policy-2.4.6-166.el5

You said it was not in 165.  I know that.  Wild goose chase.
Comment 11 errata-xmlrpc 2009-01-20 16:31:06 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0163.html

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