Bug 461326 - SELinux is preventing snmpd (snmpd_t) "read" to pipe (crond_t)
SELinux is preventing snmpd (snmpd_t) "read" to pipe (crond_t)
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy-targeted (Show other bugs)
5.2
All Linux
medium Severity medium
: rc
: ---
Assigned To: Daniel Walsh
:
Depends On:
Blocks: 432518
  Show dependency treegraph
 
Reported: 2008-09-05 17:46 EDT by Rich Johnson
Modified: 2012-10-16 04:32 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-20 16:30:40 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 Rich Johnson 2008-09-05 17:46:55 EDT
Description of problem:
  SELinux is preventing snmpd (snmpd_t) "read" to pipe (crond_t) as daemon is restarted during nightly logrotate.


Version-Release number of selected component (if applicable):
  net-snmp & libs: 5.3.1-24.el5_2.1
  selinux-policy-targeted: 2.4.6-137.1.el5_2

How reproducible:


Steps to Reproduce:
1. Enable snmpd logging by creating the file /etc/snmp/snmpd.options with the following content.  (By default snmpd does not write a log file):
  OPTIONS="-Lsd -Lf /var/log/snmpd.log -p /var/run/snmpd.pid -a"

2. Enable and start the snmpd service.  (By default snmpd is not enabled):
  # chkconfig snmpd on
  # service snmpd start

3.(optional for debugging) Add this line to /etc/crontab so that logs are rotated every 5 minutes for debugging purposes:
  */5 * * * * root /usr/bin/logrotate -f /etc/logrotate.conf

  
Actual results:
  AVC denial:
     SELinux is preventing snmpd (snmpd_t) "read" to pipe (crond_t)

Expected results:
  no AVC denials;


Additional info:
Comment 1 Rich Johnson 2008-09-06 13:15:20 EDT
Another anomoly:
 -  snmpd starts up with context  system_u:system_r:snmpd_t  when system boots.
 -  after the logrotate it's running with context user_u:system_r:snmpd_t

I haven't seen any ill effects, but it's odd to see maintenance operations  changing process contexts.
Comment 2 Andrius Benokraitis 2008-09-09 17:43:35 EDT
Not sure if the component is net-snmp or selinux-policy-targeted but will go with the latter...
Comment 5 Daniel Walsh 2008-09-11 13:56:21 EDT
Fixed in selinux-policy-2.4.6-155.el5
Comment 11 errata-xmlrpc 2009-01-20 16:30:40 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.