Bug 598166 - SELinux is preventing /usr/bin/xsane from loading /usr/lib/sane/libsane-epkowa.so.1.0.15 which requires text relocation.
Summary: SELinux is preventing /usr/bin/xsane from loading /usr/lib/sane/libsane-epkow...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 12
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:d9c087ccd14...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-31 16:11 UTC by Steve Bell
Modified: 2010-10-02 19:58 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-09 00:24:42 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Steve Bell 2010-05-31 16:11:02 UTC
Summary:

SELinux is preventing /usr/bin/xsane from loading
/usr/lib/sane/libsane-epkowa.so.1.0.15 which requires text relocation.

Detailed Description:

The xsane application attempted to load /usr/lib/sane/libsane-epkowa.so.1.0.15
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/lib/sane/libsane-epkowa.so.1.0.15 to use relocation as a workaround, until
the library is fixed. Please file a bug report.

Allowing Access:

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

Fix Command:

chcon -t textrel_shlib_t '/usr/lib/sane/libsane-epkowa.so.1.0.15'

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/lib/sane/libsane-epkowa.so.1.0.15 [ file ]
Source                        xsane
Source Path                   /usr/bin/xsane
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           xsane-0.997-3.fc12
Target RPM Packages           iscan-2.10.0-1.c2
Policy RPM                    selinux-policy-3.6.32-114.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   allow_execmod
Host Name                     (removed)
Platform                      Linux (removed) 2.6.32.12-115.fc12.i686 #1 SMP Fri
                              Apr 30 20:34:53 UTC 2010 i686 athlon
Alert Count                   1
First Seen                    Mon 31 May 2010 05:07:01 PM BST
Last Seen                     Mon 31 May 2010 05:07:01 PM BST
Local ID                      c627bf60-f702-4023-b8fa-c9ea79310303
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1275322021.818:33): avc:  denied  { execmod } for  pid=2483 comm="xsane" path="/usr/lib/sane/libsane-epkowa.so.1.0.15" dev=dm-0 ino=2625859 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(1275322021.818:33): arch=40000003 syscall=125 success=no exit=-13 a0=3f0000 a1=1d000 a2=5 a3=bfdc04f0 items=0 ppid=1 pid=2483 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm="xsane" exe="/usr/bin/xsane" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  allow_execmod,xsane,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 Steve Bell 2010-05-31 16:16:21 UTC
I was trying to get my Epson Perfection 3490 Photo scanner to work;  I had just installed 'Image Scan' from Avasys (iscan-2.10.0-1.c2.i386.rpm) and then launched the XSANE Scanner tool.

Comment 2 Miroslav Grepl 2010-05-31 16:23:48 UTC
Execute:

chcon -t textrel_shlib_t '/usr/lib/sane/libsane-epkowa.so.1.0.15'

Will fix.

Comment 3 Miroslav Grepl 2010-06-04 10:39:02 UTC
Fixed in selinux-policy-3.6.32-118.noarch


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