Bug 585535

Summary: 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.
Product: [Fedora] Fedora Reporter: Onuralp SEZER <thunderbirdtr>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: aaron-kuo, abhilash6399, Abus56rus, alajal, bravoure09, bugzilla, chris.j.n, csbucur, david.paige, dwalsh, engine.games, fedora13lab, ggoscare, ian, inf.marcos, joaocarapinha82, jonas.kellens, LaSwTaMaGeAr, mail.dsp, manitha, maxime.tierre, mbf_26, mgrepl, navasoft, rianby64, rodrigoatique, ronaldcanete, sepmixon, sherifkhan, slishan, sparsa4, s_rzayev, ssabcew, thanosk, thunderbirdtr, wayne.lloyd2, zozo_sarv2000
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:6f381b0b9c504eed795bc288bb3cba089f085403545455b3995821287f907220
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-04-26 09:15:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Onuralp SEZER 2010-04-24 15:31:22 UTC
Summary:

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
'/opt/teamviewer/teamviewer/5/wine/lib/wine/shdocvw.dll.so'"

Fix Command:

chcon -t textrel_shlib_t
'/opt/teamviewer/teamviewer/5/wine/lib/wine/shdocvw.dll.so'

Additional Information:

Source Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
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-
                              preloader
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) 2.6.32.11-99.fc12.i686
                              #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 09:15:42 UTC
Turn on the allow_execmod boolean

setsebool -P allow_execmod 1

Or set the context using chcon.

chcon -t textrel_shlib_t
'/opt/teamviewer/teamviewer/5/wine/lib/wine/shdocvw.dll.so'

Comment 2 Onuralp SEZER 2010-04-26 18:37:07 UTC
Thanks for helping It's done now