RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 712961 - SELinux policy missing access for /var/spool/rsyslogd
Summary: SELinux policy missing access for /var/spool/rsyslogd
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-13 18:21 UTC by Sean E. Millichamp
Modified: 2018-11-14 12:03 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-3.7.19-98
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 10:08:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1511 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2011-12-06 00:39:17 UTC

Description Sean E. Millichamp 2011-06-13 18:21:40 UTC
Description of problem:

$ rpm -q selinux-policy
selinux-policy-3.7.19-93.el6.noarch

rsyslog can be configured to use a spool directory to store logs when upstream syslog servers are not reachable.  The policy already has permissions for /var/spool/rsyslogd, but not /var/spool.  This prevents rsyslog from starting.

Also, it appears that rsyslog may need access to the random character device (likely to support the TLS configuration we have)

Here are the relevant audit.log entries:

type=AVC msg=audit(1307988290.489:19097): avc:  denied  { search } for  pid=12357 comm="rsyslogd" name="spool" dev=dm-0 ino=393585 scontext=unconfined_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:var_spool_t:s0 tclass=dir
type=SYSCALL msg=audit(1307988290.489:19097): arch=c000003e syscall=4 success=no exit=-13 a0=7fff20b35ea0 a1=7fff20b35e00 a2=7fff20b35e00 a3=fffffff8 items=0 ppid=12356 pid=12357 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3132 comm="rsyslogd" exe="/sbin/rsyslogd" subj=unconfined_u:system_r:syslogd_t:s0 key=(null)
type=AVC msg=audit(1307988290.493:19098): avc:  denied  { read } for  pid=12358 comm=72733A616374696F6E203620717565 name="random" dev=devtmpfs ino=3783 scontext=unconfined_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:random_device_t:s0 tclass=chr_file
type=SYSCALL msg=audit(1307988290.493:19098): arch=c000003e syscall=21 success=no exit=-13 a0=7f883d1f34e8 a1=4 a2=0 a3=0 items=0 ppid=1 pid=12358 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3132 comm=72733A616374696F6E203620717565 exe="/sbin/rsyslogd" subj=unconfined_u:system_r:syslogd_t:s0 key=(null)
type=ANOM_ABEND msg=audit(1307988290.493:19099): auid=0 uid=0 gid=0 ses=3132 subj=unconfined_u:system_r:syslogd_t:s0 pid=12358 comm=72733A616374696F6E203620717565 sig=6

I applied this custom policy and it starts and seems to run properly:

module rsyslogdlocal 1.0;

require {
	type syslogd_t;
	type random_device_t;
	type var_spool_t;
	class dir search;
	class chr_file read;
}

#============= syslogd_t ==============
allow syslogd_t random_device_t:chr_file read;
allow syslogd_t var_spool_t:dir search;

The version of rsyslog is: rsyslog-4.6.2-3.el6.x86_64

Thanks!

Comment 2 Daniel Walsh 2011-06-13 18:52:59 UTC
Fixes are already in  selinux-policy-3.7.19-98.fc16

Comment 5 errata-xmlrpc 2011-12-06 10:08:32 UTC
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-2011-1511.html


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