Bug 585535 - SELinux is preventing /opt/teamviewer/teamviewer/5/wine/bin/wine-preloader from loading /opt/teamviewer/teamviewer/5/wine/lib/wine/shdocvw.dll.so which requires text relocation.
SELinux is preventing /opt/teamviewer/teamviewer/5/wine/bin/wine-preloader fr...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2010-04-24 11:31 EDT by Onuralp SEZER
Modified: 2010-11-16 20:07 EST (History)
37 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-04-26 05:15:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Onuralp SEZER 2010-04-24 11:31:22 EDT

SELinux is preventing /opt/teamviewer/teamviewer/5/wine/bin/wine-preloader from
loading /opt/teamviewer/teamviewer/5/wine/lib/wine/shdocvw.dll.so which requires
text relocation.

Detailed Description:

The wineboot.exe application attempted to load
/opt/teamviewer/teamviewer/5/wine/lib/wine/shdocvw.dll.so which requires text
relocation. This is a potential security problem. Most libraries do not need
this permission. Libraries are sometimes coded incorrectly and request this
permission. The SELinux Memory Protection Tests
(http://people.redhat.com/drepper/selinux-mem.html) web page explains how to
remove this requirement. You can configure SELinux temporarily to allow
/opt/teamviewer/teamviewer/5/wine/lib/wine/shdocvw.dll.so to use relocation as a
workaround, until the library is fixed. Please file a bug report.

Allowing Access:

If you trust /opt/teamviewer/teamviewer/5/wine/lib/wine/shdocvw.dll.so to run
correctly, you can change the file context to textrel_shlib_t. "chcon -t
textrel_shlib_t '/opt/teamviewer/teamviewer/5/wine/lib/wine/shdocvw.dll.so'" You
must also change the default file context files on the system in order to
preserve them even on a full relabel. "semanage fcontext -a -t textrel_shlib_t

Fix Command:

chcon -t textrel_shlib_t

Additional Information:

Source Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
Target Context                system_u:object_r:lib_t:s0
Target Objects                /opt/teamviewer/teamviewer/5/wine/lib/wine/shdocvw
                              .dll.so [ file ]
Source                        wine
Source Path                   /opt/teamviewer/teamviewer/5/wine/bin/wine-
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           teamviewer5-5.0-1
Target RPM Packages           teamviewer5-5.0-1
Policy RPM                    selinux-policy-3.6.32-110.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   allow_execmod
Host Name                     (removed)
Platform                      Linux (removed)
                              #1 SMP Mon Apr 5 16:32:08 EDT 2010 i686 i686
Alert Count                   103
First Seen                    Sun 25 Apr 2010 09:28:34 PM EEST
Last Seen                     Sun 25 Apr 2010 09:28:37 PM EEST
Local ID                      47c44341-dcf5-4b70-a9f3-8bd380a9462b
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1272220117.951:143): avc:  denied  { execmod } for  pid=4165 comm="wineboot.exe" path="/opt/teamviewer/teamviewer/5/wine/lib/wine/shdocvw.dll.so" dev=sda6 ino=526217 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lib_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1272220117.951:143): arch=40000003 syscall=125 success=no exit=-13 a0=72d4a000 a1=1000 a2=7 a3=72d4a000 items=0 ppid=1 pid=4165 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm="wineboot.exe" exe="/opt/teamviewer/teamviewer/5/wine/bin/wine-preloader" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)

Hash String generated from  allow_execmod,wine,unconfined_t,lib_t,file,execmod
audit2allow suggests:

#============= unconfined_t ==============
#!!!! This avc can be allowed using the boolean 'allow_execmod'

allow unconfined_t lib_t:file execmod;
Comment 1 Miroslav Grepl 2010-04-26 05:15:42 EDT
Turn on the allow_execmod boolean

setsebool -P allow_execmod 1

Or set the context using chcon.

chcon -t textrel_shlib_t
Comment 2 Onuralp SEZER 2010-04-26 14:37:07 EDT
Thanks for helping It's done now

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