Bug 794698

Summary: SELinux is preventing /usr/local/nctuns/bin/nctunsse from loading /usr/local/nctuns/lib/libawp.so which requires text relocation.
Product: [Fedora] Fedora Reporter: obaid <obaidateeb>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED CANTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 12CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:f78179661129bb2592ad26dff8fb7272550c47300bd5827744c7474d82701e83
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-17 14:32:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description obaid 2012-02-17 10:43:42 UTC
Summary:

SELinux is preventing /usr/local/nctuns/bin/nctunsse from loading
/usr/local/nctuns/lib/libawp.so which requires text relocation.

Detailed Description:

The nctunsse application attempted to load /usr/local/nctuns/lib/libawp.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
/usr/local/nctuns/lib/libawp.so to use relocation as a workaround, until the
library is fixed. Please file a bug report.

Allowing Access:

If you trust /usr/local/nctuns/lib/libawp.so to run correctly, you can change
the file context to textrel_shlib_t. "chcon -t textrel_shlib_t
'/usr/local/nctuns/lib/libawp.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 '/usr/local/nctuns/lib/libawp.so'"

Fix Command:

chcon -t textrel_shlib_t '/usr/local/nctuns/lib/libawp.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                /usr/local/nctuns/lib/libawp.so [ file ]
Source                        nctunsse
Source Path                   /usr/local/nctuns/bin/nctunsse
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-41.fc12
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   allow_execmod
Host Name                     (removed)
Platform                      Linux (removed) 2.6.31.6-nctuns20091227 #1 Sun Dec
                              27 14:25:10 UTC 2009 i686 i686
Alert Count                   7
First Seen                    Fri 17 Feb 2012 03:19:07 PM PKT
Last Seen                     Fri 17 Feb 2012 03:41:29 PM PKT
Local ID                      0237dcb6-fbdf-4339-a4af-fe6de2fc16aa
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1329475289.394:27163): avc:  denied  { execmod } for  pid=2686 comm="nctunsse" path="/usr/local/nctuns/lib/libawp.so" dev=sda10 ino=139429 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(1329475289.394:27163): arch=40000003 syscall=125 success=no exit=-13 a0=b77e2000 a1=2000 a2=5 a3=bfde35f0 items=0 ppid=2669 pid=2686 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=pts2 ses=1 comm="nctunsse" exe="/usr/local/nctuns/bin/nctunsse" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  selinux-policy-3.6.32-41.fc12,allow_execmod,nctunsse,unconfined_t,lib_t,file,execmod
audit2allow suggests:

#============= unconfined_t ==============
allow unconfined_t lib_t:file execmod;

Comment 1 Daniel Walsh 2012-02-17 14:32:41 UTC
Please update to a supported fedora.