Bug 621392

Summary: SELinux is preventing /home/cara/Downloads/wowmatrix from loading /home/cara/.local/share/Acreon/WowMatrix/Libraries/wmzip.so which requires text relocation.
Product: [Fedora] Fedora Reporter: cara <c69jay>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CANTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:41944128657d51daac9d782c18ea5ccebf39a66fa575bf09d027b668aba8be14
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-05 19:57:19 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 cara 2010-08-04 22:23:27 UTC
Summary:

SELinux is preventing /(removed)/cara/Downloads/wowmatrix from loading
/(removed)/cara/.local/share/Acreon/WowMatrix/Libraries/wmzip.so which requires text
relocation.

Detailed Description:

The wowmatrix application attempted to load
/(removed)/cara/.local/share/Acreon/WowMatrix/Libraries/wmzip.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
/(removed)/cara/.local/share/Acreon/WowMatrix/Libraries/wmzip.so to use relocation as
a workaround, until the library is fixed. Please file a bug report.

Allowing Access:

If you trust /(removed)/cara/.local/share/Acreon/WowMatrix/Libraries/wmzip.so to run
correctly, you can change the file context to textrel_shlib_t. "chcon -t
textrel_shlib_t '/(removed)/cara/.local/share/Acreon/WowMatrix/Libraries/wmzip.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
'/(removed)/cara/.local/share/Acreon/WowMatrix/Libraries/wmzip.so'"

Fix Command:

chcon -t textrel_shlib_t
'/(removed)/cara/.local/share/Acreon/WowMatrix/Libraries/wmzip.so'

Additional Information:

Source Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Context                unconfined_u:object_r:data_(removed)_t:s0
Target Objects                /(removed)/cara/.local/share/Acreon/WowMatrix/Libraries
                              /wmzip.so [ file ]
Source                        wowmatrix
Source Path                   /(removed)/cara/Downloads/wowmatrix
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-39.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   allow_execmod
Host Name                     (removed)
Platform                      Linux (removed) 2.6.33.6-147.2.4.fc13.i686 #1 SMP Fri
                              Jul 23 17:27:40 UTC 2010 i686 i686
Alert Count                   2
First Seen                    Wed 04 Aug 2010 03:22:40 PM MST
Last Seen                     Wed 04 Aug 2010 03:22:40 PM MST
Local ID                      80a2ca0d-f1c4-4bc1-9af6-e83b1ec3855b
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1280960560.873:66): avc:  denied  { execmod } for  pid=3956 comm="wowmatrix" path="/(removed)/cara/.local/share/Acreon/WowMatrix/Libraries/wmzip.so" dev=dm-0 ino=3017904 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:data_(removed)_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1280960560.873:66): arch=40000003 syscall=125 success=no exit=-13 a0=694000 a1=dc000 a2=5 a3=bf96aaf0 items=0 ppid=1 pid=3956 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm="wowmatrix" exe="/(removed)/cara/Downloads/wowmatrix" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  allow_execmod,wowmatrix,unconfined_t,data_home_t,file,execmod
audit2allow suggests:libsepol.context_from_record: type data_(removed)_t is not defined
libsepol.context_from_record: could not create context structure
libsepol.context_from_string: could not create context structure
libsepol.sepol_context_to_sid: could not convert unconfined_u:object_r:data_(removed)_t:s0 to sid

Comment 1 Daniel Walsh 2010-08-05 19:57:19 UTC
If you want this to work you will have to turn on the allow_execmod boolean.

# setsebool -P allow_execmod 1