This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 651609 - clustat denied bind to hi_reserved_port_t
clustat denied bind to hi_reserved_port_t
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy (Show other bugs)
5.6
All Linux
low Severity low
: rc
: ---
Assigned To: Miroslav Grepl
Milos Malik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-09 16:39 EST by Nate Straz
Modified: 2012-11-23 16:07 EST (History)
4 users (show)

See Also:
Fixed In Version: selinux-policy-2.4.6-301.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-07-21 05:21:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Nate Straz 2010-11-09 16:39:59 EST
Description of problem:

I'm getting some intermittent SELinux AVCs from the ricci_modclusterd_t context when shutting down cman.  During a regression run I hit this 12 times on a three node cluster which stopped cman 50 times.

I'm not sure if this is hiding a bug in clustat in an error case or if the the SELinux policy should be updated to allow binding to tcp ports from 600 to 1024.


Version-Release number of selected component (if applicable):
modcluster-0.12.1-3.el5
rgmanager-2.0.52-7.el5
selinux-policy-2.4.6-289.el5


How reproducible:
24% of the time

Steps to Reproduce:
run whiplash or hokey-pokey on the cluster
  
Actual results:
AVCs in /var/log/audit/audit.log

Expected results:
No AVCs

Additional info:

I haven't noticed this affecting regular cluster operations.
Comment 1 Nate Straz 2010-11-09 16:43:40 EST
Example of the AVC and following message:

type=AVC msg=audit(1289314629.926:630): avc:  denied  { name_bind } for  pid=17395 comm="clustat" src=1023 scontext=system_u:system_r:ricci_modclusterd_t:s0 tcontext=system_u:object_r:hi_reserved_port_t:s0 tclass=tcp_socket
type=SYSCALL msg=audit(1289314629.926:630): arch=c000003e syscall=49 success=no exit=-13 a0=5 a1=7fff2b9b2ff0 a2=1c a3=7fff2b9b3028 items=0 ppid=9731 pid=17395 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="clustat" exe="/usr/sbin/clustat" subj=system_u:system_r:ricci_modclusterd_t:s0 key=(null)
type=AVC msg=audit(1289314629.927:631): avc:  denied  { name_bind } for  pid=17395 comm="clustat" src=611 scontext=system_u:system_r:ricci_modclusterd_t:s0 tcontext=system_u:object_r:hi_reserved_port_t:s0 tclass=tcp_socket
type=SYSCALL msg=audit(1289314629.927:631): arch=c000003e syscall=49 success=no exit=-13 a0=5 a1=7fff2b9b3010 a2=10 a3=0 items=0 ppid=9731 pid=17395 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="clustat" exe="/usr/sbin/clustat" subj=system_u:system_r:ricci_modclusterd_t:s0 key=(null)
Comment 3 Miroslav Grepl 2011-02-01 06:53:11 EST
Nate,
did you setup NIS and cluster environment together.
Comment 4 Daniel Walsh 2011-02-01 11:32:15 EST
Does clustat bind to a reserved port?

bindresvport (3)     - bind a socket to a privileged IP port
Comment 5 Daniel Walsh 2011-02-01 11:37:22 EST
Miroslav I think the policy should be

corenet_tcp_bind_all_rpc_ports(ricci_modclusterd_t)
Comment 6 Daniel Walsh 2011-02-01 11:38:23 EST
Please do this in F13,F14 and RHEL6 also.
Comment 7 Miroslav Grepl 2011-02-01 11:41:33 EST
Yes, it looks so.
Comment 8 Lon Hohberger 2011-02-09 17:02:36 EST
clustat talks to ccsd via libccs which calls bindresvport()
Comment 9 Daniel Walsh 2011-02-10 09:42:24 EST
Thanks Lon.
Comment 10 Miroslav Grepl 2011-03-01 12:07:40 EST
Fixed in selinux-policy-2.4.6-301.el5
Comment 13 errata-xmlrpc 2011-07-21 05:21:19 EDT
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-2011-1069.html
Comment 14 errata-xmlrpc 2011-07-21 07:49:56 EDT
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-2011-1069.html

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