Bug 1004614 - SELinux is preventing /usr/sbin/sshd from 'name_bind' accesses on the tcp_socket .
SELinux is preventing /usr/sbin/sshd from 'name_bind' accesses on the tcp_soc...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
19
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:8386f59bd7aa5b4b6118e0f17b0...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-05 00:05 EDT by David Allen
Modified: 2013-09-05 03:41 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-05 03:41:54 EDT
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 David Allen 2013-09-05 00:05:11 EDT
Description of problem:
SELinux is preventing /usr/sbin/sshd from 'name_bind' accesses on the tcp_socket .

*****  Plugin bind_ports (92.2 confidence) suggests  *************************

If you want to allow /usr/sbin/sshd to bind to network port 9922
Then you need to modify the port type.
Do
# semanage port -a -t PORT_TYPE -p tcp 9922
    where PORT_TYPE is one of the following: ssh_port_t, vnc_port_t, xserver_port_t.

*****  Plugin catchall_boolean (7.83 confidence) suggests  *******************

If you want to allow system to run with NIS
Then you must tell SELinux about this by enabling the 'nis_enabled' boolean.
You can read 'None' man page for more details.
Do
setsebool -P nis_enabled 1

*****  Plugin catchall (1.41 confidence) suggests  ***************************

If you believe that sshd should be allowed name_bind access on the  tcp_socket by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep sshd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:sshd_t:s0-s0:c0.c1023
Target Context                system_u:object_r:unreserved_port_t:s0
Target Objects                 [ tcp_socket ]
Source                        sshd
Source Path                   /usr/sbin/sshd
Port                          9922
Host                          (removed)
Source RPM Packages           openssh-server-6.2p2-5.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-73.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.10.10-200.fc19.x86_64 #1 SMP Thu
                              Aug 29 19:05:45 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-09-04 21:03:28 PDT
Last Seen                     2013-09-04 21:03:28 PDT
Local ID                      cf4b5033-05c9-493f-96e7-007adf514f8f

Raw Audit Messages
type=AVC msg=audit(1378353808.140:1012): avc:  denied  { name_bind } for  pid=23928 comm="sshd" src=9922 scontext=system_u:system_r:sshd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:unreserved_port_t:s0 tclass=tcp_socket


type=SYSCALL msg=audit(1378353808.140:1012): arch=x86_64 syscall=bind success=no exit=EACCES a0=3 a1=7f2ccfd9c210 a2=1c a3=7fff9822ffa4 items=0 ppid=1 pid=23928 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=sshd exe=/usr/sbin/sshd subj=system_u:system_r:sshd_t:s0-s0:c0.c1023 key=(null)

Hash: sshd,sshd_t,unreserved_port_t,tcp_socket,name_bind

Additional info:
reporter:       libreport-2.1.6
hashmarkername: setroubleshoot
kernel:         3.10.10-200.fc19.x86_64
type:           libreport

Potential duplicate: bug 890781
Comment 1 David Allen 2013-09-05 00:41:14 EDT
I fixed the port problem by setting the port type to ssh_port_t, so I suppose you can ignore that issue.

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