Bug 624498 - SELinux is preventing /usr/bin/simple-scan from loading /usr/lib64/sane/libsane-smfp.so.1.0.1 which requires text relocation.
SELinux is preventing /usr/bin/simple-scan from loading /usr/lib64/sane/libsa...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
13
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
setroubleshoot_trace_hash:e8145391464...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-16 12:49 EDT by Sean
Modified: 2010-08-17 05:06 EDT (History)
2 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description Sean 2010-08-16 12:49:44 EDT
Summary:

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
'/usr/lib64/sane/libsane-smfp.so.1.0.1'"

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
                              023
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) 2.6.33.6-147.2.4.fc13.x86_64 #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 05:06:27 EDT
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.