Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1357508 - AVC denials for unreserved port observed while configuring nfs-ganesha.
Summary: AVC denials for unreserved port observed while configuring nfs-ganesha.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.2
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks: 1354661
TreeView+ depends on / blocked
 
Reported: 2016-07-18 11:58 UTC by Shashank Raj
Modified: 2016-11-08 03:52 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-09 12:51:16 UTC


Attachments (Terms of Use)

Description Shashank Raj 2016-07-18 11:58:37 UTC
Description of problem:

AVC denials for unreserved port observed while configuring nfs-ganesha.

Version-Release number of selected component (if applicable):

nfs-ganesha-2.3.1-8

[root@dhcp43-208 ~]# rpm -qa|grep selinux
selinux-policy-3.13.1-60.el7_2.7.noarch
selinux-policy-targeted-3.13.1-60.el7_2.7.noarch

How reproducible:

Consistent

Steps to Reproduce:

1.Update rquota port in ganesha.conf under /etc/ganesha/ganesha.conf with any other port than 875.

like below:

NFS_Core_Param {
        #Use supplied name other tha IP In NSM operations
        NSM_Use_Caller_Name = true;
        #Copy lock states into "/var/lib/nfs/ganesha" dir
        Clustered = false;
        #By default port number '2049' is used for NFS service.
        #Configure ports for MNT, NLM, RQuota services.
        #The ports chosen here are from '/etc/sysconfig/nfs'
        MNT_Port = 20048;
        NLM_Port = 32803;
        Rquota_Port = 8750;
}

2. Try to setup ganesha on the cluster.

3. Observe that ganesha service goes to failed state with below messages in ganesha.log:

18/07/2016 07:43:52 : epoch 1a100000 : dhcp43-208.lab.eng.blr.redhat.com : ganesha.nfsd-30912[main] Bind_sockets_V6 :DISP :WARN :Cannot bind RQUOTA udp6 socket, error 13 (Permission denied)
18/07/2016 07:43:52 : epoch 1a100000 : dhcp43-208.lab.eng.blr.redhat.com : ganesha.nfsd-30912[main] Bind_sockets :DISP :FATAL :Error binding to V6 interface. Cannot continue.

and following denial AVC's are seen in audit.log

type=AVC msg=audit(1468842120.174:587): avc:  denied  { name_bind } for  pid=30640 comm="ganesha.nfsd" src=8750 scontext=system_u:system_r:glusterd_t:s0 tcontext=system_u:object_r:unreserved_port_t:s0 tclass=udp_socket

type=AVC msg=audit(1468842120.146:611): avc:  denied  { name_bind } for  pid=30335 comm="ganesha.nfsd" src=8750 scontext=system_u:system_r:glusterd_t:s0 tcontext=system_u:object_r:unreserved_port_t:s0 tclass=udp_socket

type=AVC msg=audit(1468842120.138:635): avc:  denied  { name_bind } for  pid=29146 comm="ganesha.nfsd" src=8750 scontext=system_u:system_r:glusterd_t:s0 tcontext=system_u:object_r:unreserved_port_t:s0 tclass=udp_socket

type=AVC msg=audit(1468842120.176:610): avc:  denied  { name_bind } for  pid=29790 comm="ganesha.nfsd" src=8750 scontext=system_u:system_r:glusterd_t:s0 tcontext=system_u:object_r:unreserved_port_t:s0 tclass=udp_socket

Actual results:

AVC denials for unreserved port observed while configuring nfs-ganesha.

Expected results:

There should not be any AVC denials when different port is used for rquota than 875.

Additional info:

Comment 8 Shashank Raj 2016-08-09 12:49:14 UTC
Since we haven't heard back anything on the original reported problem from customer side, i would say lets close this bug for 7.3.

Will open a new bug for 7.2.z if its required.

Thanks

Comment 9 Lukas Vrabec 2016-08-09 12:51:16 UTC
According to comment#8 closing this issue.


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