Bug 217860 - SELinux issue with prelink
SELinux issue with prelink
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
6
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-30 09:14 EST by vfiend
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: Current
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-22 10:12:35 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 vfiend 2006-11-30 09:14:40 EST
Summary
    SELinux is preventing /usr/sbin/prelink (prelink_t) "read" to nethack
    (usr_t).

Detailed Description
    SELinux denied access requested by /usr/sbin/prelink. It is not expected
    that this access is required by /usr/sbin/prelink and this access may signal
    an intrusion attempt. It is also possible that the specific version or
    configuration of the application is causing it to require additional access.

Allowing Access
    Sometimes labeling problems can cause SELinux denials.  You could try to
    restore the default system file context for nethack, restorecon -v nethack
    If this does not work, there is currently no automatic way to allow this
    access. Instead,  you can generate a local policy module to allow this
    access - see http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385 Or you
    can disable SELinux protection altogether. Disabling SELinux protection is
    not recommended. Please file a
    http://bugzilla.redhat.com/bugzilla/enter_bug.cgi against this package.

Additional Information:       

Source Context:               system_u:system_r:prelink_t
Target Context:               system_u:object_r:usr_t
Target Objects:               nethack [ file ]
Affected RPM Packages:        prelink-0.3.9-2 [application]
Policy RPM:                   selinux-policy-2.4.5-3.fc6
Selinux Enabled:              True
Policy Type:                  targeted
MLS Enabled:                  True
Enforcing Mode:               Enforcing
Plugin Name:                  plugins.catchall_file
Host Name:                    icarus
Platform:                     Linux icarus 2.6.18-1.2849.fc6 #1 SMP Fri Nov 10
12:34:46 EST 2006 x86_64 x86_64
Alert Count:                  1
Line Numbers:                 

Raw Audit Messages:           

avc: denied { read } for comm="prelink" dev=dm-0 egid=0 euid=0
exe="/usr/sbin/prelink" exit=-13 fsgid=0 fsuid=0 gid=0 items=0 name="nethack"
pid=7939 scontext=system_u:system_r:prelink_t:s0 sgid=0
subj=system_u:system_r:prelink_t:s0 suid=0 tclass=file
tcontext=system_u:object_r:usr_t:s0 tty=(none) uid=0
Comment 1 Daniel Walsh 2006-11-30 12:47:07 EST
Where is nethack installed?  How is it labeled?

ls -lZ nethack

It should be labeled bin_t.

chcon -t bin_t nethack
Comment 2 vfiend 2006-11-30 12:52:54 EST
$ which nethack
/usr/bin/nethack
$ ls -lZ /usr/bin/nethack
-rwxr-xr-x  root root system_u:object_r:bin_t          /usr/bin/nethack
Comment 3 Daniel Walsh 2006-11-30 13:42:35 EST
Prelink is looking at a different one which is labeled usr_t.
Comment 4 vfiend 2006-11-30 14:54:22 EST
$ ls -lZ /usr/games/nethack-3.4.3/nethack
-rwxr-sr-x  root games system_u:object_r:usr_t         
/usr/games/nethack-3.4.3/nethack

Ah. So the bug is with the Fedora Extras nethack rpm, I guess
Comment 5 Daniel Walsh 2006-12-01 16:51:45 EST
Fixed in selinux-policy-2.4.6-5
Comment 6 Daniel Walsh 2007-08-22 10:12:35 EDT
Fixed in current release

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