Bug 987196

Summary: SELinux is preventing /usr/sbin/sshd from 'name_bind' accesses on the tcp_socket .
Product: [Fedora] Fedora Reporter: TPol <t-pol>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:8c7719c2df01a997afe13edd7d6f94c8363e789638c0d91ef798770a0ed96e53
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-24 08:41:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description TPol 2013-07-22 23:04:12 UTC
Description of problem:
SELinux is preventing /usr/sbin/sshd from 'name_bind' accesses on the tcp_socket .

*****  Plugin catchall (100. confidence) suggests  ***************************

If sie denken, dass es sshd standardmässig erlaubt sein sollte, name_bind Zugriff auf  tcp_socket zu erhalten.
Then sie sollten dies als Fehler melden.
Um diesen Zugriff zu erlauben, können Sie ein lokales Richtlinien-Modul erstellen.
Do
zugriff jetzt erlauben, indem Sie die nachfolgenden Befehle ausführen:
# 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:l2tp_port_t:s0
Target Objects                 [ tcp_socket ]
Source                        sshd
Source Path                   /usr/sbin/sshd
Port                          1701
Host                          (removed)
Source RPM Packages           openssh-server-6.2p2-3.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-65.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.9-302.fc19.x86_64 #1 SMP Sat
                              Jul 6 13:41:07 UTC 2013 x86_64 x86_64
Alert Count                   6
First Seen                    2013-07-20 01:54:27 CEST
Last Seen                     2013-07-23 02:56:17 CEST
Local ID                      9933e005-0338-4c8e-9460-28418e83a287

Raw Audit Messages
type=AVC msg=audit(1374540977.822:58): avc:  denied  { name_bind } for  pid=800 comm="sshd" src=1701 scontext=system_u:system_r:sshd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:l2tp_port_t:s0 tclass=tcp_socket


type=SYSCALL msg=audit(1374540977.822:58): arch=x86_64 syscall=bind success=no exit=EACCES a0=3 a1=7f66faec4430 a2=1c a3=7fffe8cb6304 items=0 ppid=1 pid=800 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,l2tp_port_t,tcp_socket,name_bind

Additional info:
reporter:       libreport-2.1.5
hashmarkername: setroubleshoot
kernel:         3.9.9-302.fc19.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2013-07-24 08:41:08 UTC
If you setup sshd to use this port, you will need to add a local policy or change the port.