Bug 652980

Summary: SELinux is preventing /opt/TweetDeck/bin/TweetDeck from loading /opt/Adobe AIR/Versions/1.0/Resources/libcurl.so which requires text relocation.
Product: [Fedora] Fedora Reporter: Greg Harvey <gharveyatwork>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG 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:99a22e76a079059c28e1e1ed6ce990684f749b4a9d4763f204375fdf5373c444
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-15 11:54:43 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 Greg Harvey 2010-11-13 22:57:12 UTC
Summary:

SELinux is preventing /opt/TweetDeck/bin/TweetDeck from loading /opt/Adobe
AIR/Versions/1.0/Resources/libcurl.so which requires text relocation.

Detailed Description:

[SELinux is in permissive mode. This access was not denied.]

The TweetDeck application attempted to load /opt/Adobe
AIR/Versions/1.0/Resources/libcurl.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://www.akkadia.org/drepper/selinux-mem.html) web page explains how to
remove this requirement. You can configure SELinux temporarily to allow
/opt/Adobe AIR/Versions/1.0/Resources/libcurl.so to use relocation as a
workaround, until the library is fixed. Please file a bug report.

Allowing Access:

If you trust /opt/Adobe AIR/Versions/1.0/Resources/libcurl.so to run correctly,
you can change the file context to textrel_shlib_t. "chcon -t textrel_shlib_t
'/opt/Adobe AIR/Versions/1.0/Resources/libcurl.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/Adobe.AIR/Versions/1.0/Resources/libcurl.so'"

Fix Command:

chcon -t textrel_shlib_t '/opt/Adobe AIR/Versions/1.0/Resources/libcurl.so'

Additional Information:

Source Context                unconfined_u:unconfined_r:unconfined_execmem_t:s0-
                              s0:c0.c1023
Target Context                system_u:object_r:lib_t:s0
Target Objects                /opt/Adobe AIR/Versions/1.0/Resources/libcurl.so [
                              file ]
Source                        41646F626520414952205570646174
Source Path                   /opt/Adobe AIR/Versions/1.0/Resources/Adobe AIR
                              Updater
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           tweetdeckfast.fff259dc0ce2657847bbb4aff0e62062efc5
                              6543.1-0.36.2-1
Target RPM Packages           adobeair-2.5.1-17730
Policy RPM                    selinux-policy-3.7.19-69.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Plugin Name                   allow_execmod
Host Name                     (removed)
Platform                      Linux (removed) 2.6.34.7-56.fc13.i686 #1 SMP
                              Wed Sep 15 03:33:58 UTC 2010 i686 i686
Alert Count                   7
First Seen                    Wed 27 Oct 2010 01:14:08 CEST
Last Seen                     Sat 13 Nov 2010 23:54:34 CET
Local ID                      713864fa-4d0e-40b2-866a-d4f297c9e4e9
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1289688874.734:24323): avc:  denied  { execmod } for  pid=18601 comm="TweetDeck" path=2F6F70742F41646F6265204149522F56657273696F6E732F312E302F5265736F75726365732F6C69626375726C2E736F dev=dm-0 ino=393117 scontext=unconfined_u:unconfined_r:unconfined_execmem_t:s0-s0:c0.c1023 tcontext=system_u:object_r:lib_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1289688874.734:24323): arch=40000003 syscall=125 success=yes exit=0 a0=6b4000 a1=13e000 a2=5 a3=bf84ea50 items=0 ppid=1 pid=18601 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=4 comm="TweetDeck" exe="/opt/TweetDeck/bin/TweetDeck" subj=unconfined_u:unconfined_r:unconfined_execmem_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  allow_execmod,41646F626520414952205570646174,unconfined_execmem_t,lib_t,file,execmod
audit2allow suggests:

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

allow unconfined_execmem_t lib_t:file execmod;

Comment 1 Miroslav Grepl 2010-11-15 11:54:43 UTC
Either change the context on the library as specified in the alert or turn off
the check altogether.

# setsebool -P allow_execmod 1