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 1026078 - SELinux prevents varnishd from searching in /sys/devices/system/cpu directory
Summary: SELinux prevents varnishd from searching in /sys/devices/system/cpu directory
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.5
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
: 1025315 1026077 1083105 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-03 12:59 UTC by Milos Malik
Modified: 2014-10-14 07:57 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-14 07:57:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1568 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2014-10-14 01:27:37 UTC

Description Milos Malik 2013-11-03 12:59:38 UTC
Description of problem:


Version-Release number of selected component (if applicable):
selinux-policy-3.7.19-231.el6.noarch
selinux-policy-doc-3.7.19-231.el6.noarch
selinux-policy-minimum-3.7.19-231.el6.noarch
selinux-policy-mls-3.7.19-231.el6.noarch
selinux-policy-targeted-3.7.19-231.el6.noarch
varnish-2.1.5-1.el6.x86_64
varnish-libs-2.1.5-1.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. get a RHEL-6.5 machine where targeted policy is active
2. service varnish start
3. search for AVCs

Actual results:
----
type=PATH msg=audit(11/03/2013 13:57:21.124:651) : item=0 name=/sys/devices/system/cpu/online inode=1 dev=00:00 mode=dir,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:sysfs_t:s0 nametype=NORMAL 
type=CWD msg=audit(11/03/2013 13:57:21.124:651) :  cwd=/ 
type=SYSCALL msg=audit(11/03/2013 13:57:21.124:651) : arch=x86_64 syscall=open success=no exit=-13(Permission denied) a0=3f1b1592b8 a1=80000 a2=1fffe98a4167 a3=1 items=1 ppid=7681 pid=7682 auid=root uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=pts0 ses=9 comm=varnishd exe=/usr/sbin/varnishd subj=unconfined_u:system_r:varnishd_t:s0 key=(null) 
type=AVC msg=audit(11/03/2013 13:57:21.124:651) : avc:  denied  { search } for  pid=7682 comm=varnishd name=/ dev=sysfs ino=1 scontext=unconfined_u:system_r:varnishd_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=dir 
----

Expected results:
 * no AVCs

Comment 1 Milos Malik 2013-11-03 13:01:48 UTC
Actual results (permissive mode):
----
type=PATH msg=audit(11/03/2013 13:59:52.622:653) : item=0 name=/sys/devices/system/cpu/online inode=23 dev=00:00 mode=file,444 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:sysfs_t:s0 nametype=NORMAL 
type=CWD msg=audit(11/03/2013 13:59:52.622:653) :  cwd=/ 
type=SYSCALL msg=audit(11/03/2013 13:59:52.622:653) : arch=x86_64 syscall=open success=yes exit=3 a0=3f1b1592b8 a1=80000 a2=1fffe51561af a3=1 items=1 ppid=7761 pid=7762 auid=root uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=pts0 ses=9 comm=varnishd exe=/usr/sbin/varnishd subj=unconfined_u:system_r:varnishd_t:s0 key=(null) 
type=AVC msg=audit(11/03/2013 13:59:52.622:653) : avc:  denied  { open } for  pid=7762 comm=varnishd name=online dev=sysfs ino=23 scontext=unconfined_u:system_r:varnishd_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file 
type=AVC msg=audit(11/03/2013 13:59:52.622:653) : avc:  denied  { read } for  pid=7762 comm=varnishd name=online dev=sysfs ino=23 scontext=unconfined_u:system_r:varnishd_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file 
type=AVC msg=audit(11/03/2013 13:59:52.622:653) : avc:  denied  { search } for  pid=7762 comm=varnishd name=/ dev=sysfs ino=1 scontext=unconfined_u:system_r:varnishd_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=dir 
----

Comment 2 Daniel Walsh 2013-11-04 17:06:47 UTC
I think there is a new glibc?  Causing all confiend apps to read the cpu file. Maybe we should dontaudit it.  Not sure if what valuable information might be under /sys.

Comment 3 Miroslav Grepl 2013-11-05 13:14:26 UTC
*** Bug 1026077 has been marked as a duplicate of this bug. ***

Comment 4 Miroslav Grepl 2013-12-13 08:16:44 UTC
*** Bug 1025315 has been marked as a duplicate of this bug. ***

Comment 5 adruch2002 2014-02-20 23:27:46 UTC
I know the status is still NEW but has this been considered any further? Is dontaudit the right answer? I'm seeing it on other apps besides varnishd.

Comment 6 Daniel Walsh 2014-02-21 21:33:41 UTC
Could you attach the AVC's you are seeing?

Comment 7 adruch2002 2014-02-22 02:59:33 UTC
Below is one of the AVC's. The subject 'scmonitor_t' if from a custom domain I have monitoring the state of some other processes. This is why I was generically asking if you planned to allow or dontaudit. I'll need to implement something for my own policy and was hoping to learn from what you decide here.

----
type=PATH msg=audit(02/22/2014 01:40:00.280:470) : item=0 name=/sys/devices/system/cpu/online inode=1 dev=00:00 mode=dir,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:sysfs_t:s0 nametype=NORMAL 
type=CWD msg=audit(02/22/2014 01:40:00.280:470) :  cwd=/ 
type=SYSCALL msg=audit(02/22/2014 01:40:00.280:470) : arch=x86_64 syscall=open success=no exit=-13(Permission denied) a0=7f09d7ba22b8 a1=80000 a2=ffffffffffffffff a3=7fff2e1c25d0 items=1 ppid=1906 pid=2428 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=pgrep exe=/usr/bin/pgrep subj=system_u:system_r:scmonitor_t:s0 key=(null) 
type=AVC msg=audit(02/22/2014 01:40:00.280:470) : avc:  denied  { search } for  pid=2428 comm=pgrep name=/ dev=sysfs ino=1 scontext=system_u:system_r:scmonitor_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=dir

Comment 8 Daniel Walsh 2014-02-24 21:36:51 UTC
Most likely the app needs to read something in /sys so I would probably allow, it depends on if there is a piece of information that you believe this process should not be allowed to sys.  Basically this allows the app to search through /sys.


Not very dangerous.

Comment 9 Miroslav Grepl 2014-04-01 17:01:34 UTC
*** Bug 1083105 has been marked as a duplicate of this bug. ***

Comment 11 errata-xmlrpc 2014-10-14 07:57:47 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-2014-1568.html


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