Bug 969281

Summary: SELinux is preventing /opt/teamviewer8/tv_bin/teamviewerd from 'name_bind' accesses on the tcp_socket .
Product: [Fedora] Fedora Reporter: Moez Roy <moez.roy>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: dominick.grift, dwalsh, lvrabec, mgrepl, moez.roy
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:3f2c4844d5072a25996baf097b119009ef4550a1a354a296d06304a63d0dc31d
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-25 13:18:12 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 Moez Roy 2013-05-31 06:46:58 UTC
Description of problem:
SELinux is preventing /opt/teamviewer8/tv_bin/teamviewerd from 'name_bind' accesses on the tcp_socket .

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

If you want to allow /opt/teamviewer8/tv_bin/teamviewerd to bind to network port 21876
Then you need to modify the port type.
Do
# semanage port -a -t  -p tcp 21876

*****  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 teamviewerd 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 teamviewerd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:init_t:s0
Target Context                system_u:object_r:unreserved_port_t:s0
Target Objects                 [ tcp_socket ]
Source                        teamviewerd
Source Path                   /opt/teamviewer8/tv_bin/teamviewerd
Port                          21876
Host                          (removed)
Source RPM Packages           teamviewer-8.0.17147-1.i686
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-97.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.4-200.fc18.x86_64 #1 SMP Fri
                              May 24 20:10:49 UTC 2013 x86_64 x86_64
Alert Count                   613
First Seen                    2013-05-30 16:33:17 PDT
Last Seen                     2013-05-30 23:34:07 PDT
Local ID                      b956461b-3f16-4588-93ed-24c8ed891ab8

Raw Audit Messages
type=AVC msg=audit(1369982047.437:16295): avc:  denied  { name_bind } for  pid=1966 comm="teamviewerd" src=21876 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:unreserved_port_t:s0 tclass=tcp_socket


type=SYSCALL msg=audit(1369982047.437:16295): arch=i386 syscall=getuid success=no exit=EACCES a0=2 a1=ffe208c0 a2=10 a3=9e800a0 items=0 ppid=1 pid=1966 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=teamviewerd exe=/opt/teamviewer8/tv_bin/teamviewerd subj=system_u:system_r:init_t:s0 key=(null)

Hash: teamviewerd,init_t,unreserved_port_t,tcp_socket,name_bind

audit2allow

#============= init_t ==============
#!!!! This avc can be allowed using the boolean 'nis_enabled'

allow init_t unreserved_port_t:tcp_socket name_bind;

audit2allow -R
require {
	type init_t;
}

#============= init_t ==============
corenet_tcp_bind_generic_port(init_t)


Additional info:
reporter:       libreport-2.1.4
hashmarkername: setroubleshoot
kernel:         3.9.4-200.fc18.x86_64
type:           libreport

Comment 1 Moez Roy 2013-05-31 06:49:46 UTC
Note the Alert Count: 613.

Setroubleshootd went up to using 1 GB of RAM and counting.

I had to kill teamviewerd for it to stop.

Comment 2 Miroslav Grepl 2013-05-31 09:51:44 UTC
*** Bug 969282 has been marked as a duplicate of this bug. ***

Comment 3 Miroslav Grepl 2013-05-31 09:51:54 UTC
*** Bug 969283 has been marked as a duplicate of this bug. ***

Comment 4 Miroslav Grepl 2013-05-31 09:52:05 UTC
*** Bug 969284 has been marked as a duplicate of this bug. ***

Comment 5 Miroslav Grepl 2013-05-31 09:52:13 UTC
*** Bug 969285 has been marked as a duplicate of this bug. ***

Comment 6 Miroslav Grepl 2013-05-31 09:55:24 UTC
*** Bug 969286 has been marked as a duplicate of this bug. ***

Comment 7 Miroslav Grepl 2013-05-31 09:55:31 UTC
*** Bug 969287 has been marked as a duplicate of this bug. ***

Comment 8 Miroslav Grepl 2013-05-31 09:55:38 UTC
*** Bug 969289 has been marked as a duplicate of this bug. ***

Comment 9 Miroslav Grepl 2013-05-31 09:55:53 UTC
*** Bug 969291 has been marked as a duplicate of this bug. ***

Comment 10 Miroslav Grepl 2013-05-31 09:56:02 UTC
*** Bug 969292 has been marked as a duplicate of this bug. ***

Comment 11 Miroslav Grepl 2013-05-31 09:56:11 UTC
*** Bug 969294 has been marked as a duplicate of this bug. ***

Comment 12 Miroslav Grepl 2013-05-31 09:56:16 UTC
*** Bug 969293 has been marked as a duplicate of this bug. ***

Comment 13 Miroslav Grepl 2013-05-31 09:57:08 UTC
*** Bug 969290 has been marked as a duplicate of this bug. ***

Comment 14 Miroslav Grepl 2013-05-31 10:01:51 UTC
The problem is there is no policy for /opt/teamviewer8/tv_bin/teamviewerd and you run with disabled unconfined module.

Either you can make init_t as unconfined or we can create an initial policy for teamviewerd.

# sepolicy generate --init -n teamviewerd PATH_TO_EXECUTABLE
# sh teamviewerd.sh

Comment 15 Daniel Walsh 2013-05-31 14:59:38 UTC
*** Bug 969295 has been marked as a duplicate of this bug. ***

Comment 16 Moez Roy 2013-06-22 04:41:49 UTC
(In reply to Miroslav Grepl from comment #14)

>  we can create an initial policy for teamviewerd.

Yes can you make an initial policy for teamviewerd?

I am not a security expert so it is best you make the policy just to make sure it is not trying to do something it should not.

Comment 17 Miroslav Grepl 2013-06-24 09:33:17 UTC
I am reading more about teamviewerd which is not a part of Fedora.

Could you try to execute

# chcon -t unconfined_exec_t PATH_TO_EXECUTABLE