Bug 399981 - SELinux is preventing wine-pthread from loading /usr/local/lib/wine/kernel32.dll.so which requires text relocation.
SELinux is preventing wine-pthread from loading /usr/local/lib/wine/kernel32....
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2007-11-26 14:15 EST by Konstantin Svist
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-11-26 21:58:46 EST
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 Konstantin Svist 2007-11-26 14:15:50 EST
Description of problem:
Executing a program (openCanvas 11b72rv1) under wine, results in the following
selinux error:

    SELinux is preventing wine-pthread from loading
    /usr/local/lib/wine/kernel32.dll.so which requires text relocation.

Detailed Description
    The wine-pthread application attempted to load
    /usr/local/lib/wine/kernel32.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
    http://people.redhat.com/drepper/selinux-mem.html web page explains how to
    remove this requirement.  You can configure SELinux temporarily to allow
    /usr/local/lib/wine/kernel32.dll.so to use relocation as a workaround, until
    the library is fixed. Please file a
    http://bugzilla.redhat.com/bugzilla/enter_bug.cgi against this package.

Allowing Access
    If you trust /usr/local/lib/wine/kernel32.dll.so to run correctly, you can
    change the file context to textrel_shlib_t. "chcon -t textrel_shlib_t
    /usr/local/lib/wine/kernel32.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

    The following command will allow this access:
    chcon -t textrel_shlib_t /usr/local/lib/wine/kernel32.dll.so

Additional Information        

Source Context                system_u:system_r:unconfined_t:s0
Target Context                system_u:object_r:lib_t:s0
Target Objects                /usr/local/lib/wine/kernel32.dll.so [ file ]
Affected RPM Packages         
Policy RPM                    selinux-policy-3.0.8-56.fc8
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Permissive
Plugin Name                   plugins.allow_execmod
Host Name                     mireille
Platform                      Linux mireille #1 SMP Thu Nov 8
                              21:41:26 EST 2007 i686 i686
Alert Count                   1
First Seen                    Mon 26 Nov 2007 11:12:01 AM PST
Last Seen                     Mon 26 Nov 2007 11:12:01 AM PST
Local ID                      6bf0b6bc-269a-44fc-b41f-6854ff6ddfdf
Line Numbers                  

Raw Audit Messages            

avc: denied { execmod } for comm=wine-pthread dev=sda9
path=/usr/local/lib/wine/kernel32.dll.so pid=4005
scontext=system_u:system_r:unconfined_t:s0 tclass=file

Version-Release number of selected component (if applicable):
selinux-policy-targeted 3.0.8-56
Comment 1 Daniel Walsh 2007-11-26 21:58:46 EST
restorecon -R -v /usr/local/lib/

Should fix the context.

Whatever installed these files did not set the proper context.

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