Bug 624498 - SELinux is preventing /usr/bin/simple-scan from loading /usr/lib64/sane/libsane-smfp.so.1.0.1 which requires text relocation.
Summary: SELinux is preventing /usr/bin/simple-scan from loading /usr/lib64/sane/libsa...
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
(Show other bugs)
Version: 13
Hardware: x86_64 Linux
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
Whiteboard: setroubleshoot_trace_hash:e8145391464...
Depends On:
TreeView+ depends on / blocked
Reported: 2010-08-16 16:49 UTC by Sean
Modified: 2010-08-17 09:06 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-08-17 09:06:27 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Sean 2010-08-16 16:49:44 UTC

SELinux is preventing /usr/bin/simple-scan from loading
/usr/lib64/sane/libsane-smfp.so.1.0.1 which requires text relocation.

Detailed Description:

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

The simple-scan application attempted to load
/usr/lib64/sane/libsane-smfp.so.1.0.1 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/lib64/sane/libsane-smfp.so.1.0.1 to use relocation as a workaround, until
the library is fixed. Please file a bug report.

Allowing Access:

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

Fix Command:

chcon -t textrel_shlib_t '/usr/lib64/sane/libsane-smfp.so.1.0.1'

Additional Information:

Source Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
Target Context                system_u:object_r:lib_t:s0
Target Objects                /usr/lib64/sane/libsane-smfp.so.1.0.1 [ file ]
Source                        simple-scan
Source Path                   /usr/bin/simple-scan
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           simple-scan-1.0.2-1.fc13
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-44.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Plugin Name                   allow_execmod
Host Name                     (removed)
Platform                      Linux (removed) #1 SMP
                              Fri Jul 23 17:14:44 UTC 2010 x86_64 x86_64
Alert Count                   1
First Seen                    Mon 16 Aug 2010 06:36:22 PM SAST
Last Seen                     Mon 16 Aug 2010 06:36:22 PM SAST
Local ID                      647ff01f-656e-49bf-82c1-34781aae4d4b
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1281976582.210:91): avc:  denied  { execmod } for  pid=3227 comm="simple-scan" path="/usr/lib64/sane/libsane-smfp.so.1.0.1" dev=dm-0 ino=4995966 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(1281976582.210:91): arch=c000003e syscall=10 success=yes exit=0 a0=7fcf553ed000 a1=4e000 a2=5 a3=7fcf55409cb8 items=0 ppid=1 pid=3227 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm="simple-scan" exe="/usr/bin/simple-scan" subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null)

Hash String generated from  allow_execmod,simple-scan,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 Miroslav Grepl 2010-08-17 09:06:27 UTC
Execute the chcon command.

chcon -t textrel_shlib_t '/usr/lib64/sane/libsane-smfp.so.1.0.1'

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