Bug 220066 - SELinux is preventing /usr/sbin/prelink (prelink_t) "read" to viruskiller (usr_t).
SELinux is preventing /usr/sbin/prelink (prelink_t) "read" to viruskiller (u...
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: setroubleshoot-plugins (Show other bugs)
6
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-18 14:04 EST by Tim McConnell
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-28 11:10:23 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 Tim McConnell 2006-12-18 14:04:07 EST
Description of problem:
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.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. SETrouble shooter shows an alert
2. View alert 
3. attempt to run command to allow access 
  
Actual results:
Still recieve the alert 


Expected results:
Alert to be allowed access 

Additional info:    

Source Context                system_u:system_r:prelink_t:SystemLow-SystemHigh
Target Context                system_u:object_r:usr_t
Target Objects                viruskiller [ file ]
Affected RPM Packages         prelink-0.3.9-2 [application]
Policy RPM                    selinux-policy-2.4.6-7.fc6
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   plugins.catchall_file
Host Name                     red1.timmieland.private
Platform                      Linux red1.timmieland.private 2.6.18-1.2860.fc6xen
                              #1 SMP Tue Dec 5 14:28:32 EST 2006 i686 athlon
Alert Count                   10
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="viruskiller" pid=5685 scontext=system_u:system_r:prelink_t:s0-s0:c0.c1023
sgid=0 subj=system_u:system_r:prelink_t:s0-s0:c0.c1023 suid=0 tclass=file
tcontext=system_u:object_r:usr_t:s0 tty=(none) uid=0
Comment 1 Daniel Walsh 2006-12-18 16:02:05 EST
Where is viruskiller located?

I have added a new prelink_mislabled plugin so setroubleshoot will now report
this as 

--------------------------------------------------------------------------------

Summary
    SELinux is preventing /usr/sbin/prelink (prelink_t) "read" on viruskiller
    (usr_t).

Detailed Description
    SELinux denied prelink read on viruskiller. The prelink program is only
    allowed to manipulate files that are identified as executables or shared
    librares by SELinux.  Libraries that get placed in lib directories get
    labeled by default as a shared library.  Similarly executables that get
    placed in a bin or sbin directory get labeled as executables by SELinux.
    However, if these files get installed in other directories they might not
    get the correct label.  If prelink is trying to manipulate a file that is
    not a binary or share library this may indicate an intrusion attack.

Allowing Access
    You can alter the file context by executing chcon -t bin_t viruskiller or
    chcon -t lib_t viruskiller if it is a shared library.  If you want to make
    these changes permanant you must execute the semanage command. semanage
    fcontext -a -t bin_t viruskiller or semanage fcontext -a -t shlib_t
    viruskiller. If you feel this executable/shared library  is in the wrong
    location please file a bug against the package that includes the file,  if
    you feel that SELinux should know about this file and label it correctly
    please file a bug against
    http://bugzilla.redhat.com/bugzilla/enter_bug.cgi.

Additional Information        

Source Context                system_u:system_r:prelink_t:SystemLow-SystemHigh
Target Context                system_u:object_r:usr_t
Target Objects                viruskiller [ file ]
Affected RPM Packages         
Policy RPM                    
Selinux Enabled               
Policy Type                   
MLS Enabled                   
Enforcing Mode                
Plugin Name                   plugins.prelink_mislabled
Host Name                     
Platform                      
Alert Count                   1
Line Numbers                  1

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="viruskiller" pid=5685 scontext=system_u:system_r:prelink_t:s0-s0:c0.c1023
sgid=0 subj=system_u:system_r:prelink_t:s0-s0:c0.c1023 suid=0 tclass=file
tcontext=system_u:object_r:usr_t:s0 tty=(none) uid=0
Comment 2 Tim McConnell 2006-12-19 02:46:44 EST
(In reply to comment #1)
> Where is viruskiller located?
If I run 'locate viruskiller' I get 
/usr/share/doc/viruskiller-1.0
/usr/share/doc/viruskiller-1.0/LICENSE
/usr/share/doc/viruskiller-1.0/README
/usr/share/doc/viruskiller-1.0/battery.png
/usr/share/doc/viruskiller-1.0/bomb.png
/usr/share/doc/viruskiller-1.0/clock.png
/usr/share/doc/viruskiller-1.0/manual.html
/usr/share/doc/viruskiller-1.0/title.png
/usr/share/doc/viruskiller-1.0/virus1.gif
/usr/share/doc/viruskiller-1.0/virus2.gif
/usr/share/doc/viruskiller-1.0/virus3.gif
/usr/share/games/viruskiller
/usr/share/games/viruskiller/viruskiller.pak
/usr/share/pixmaps/viruskiller.png
/var/cache/yum/extras-debuginfo/headers/viruskiller-debuginfo-1.0-2.fc6.i386.hdr
/var/cache/yum/extras-debuginfo/packages/viruskiller-debuginfo-1.0-2.fc6.i386.rpm
It's a game, in case you didn't know. I am curious as to how to get the alert to
stop if the suggested commands don't correct the issue. 
> 
> I have added a new prelink_mislabled plugin so setroubleshoot will now report
> this as 
> 
> --------------------------------------------------------------------------------
> 
> Summary
>     SELinux is preventing /usr/sbin/prelink (prelink_t) "read" on viruskiller
>     (usr_t).
> 
> Detailed Description
>     SELinux denied prelink read on viruskiller. The prelink program is only
>     allowed to manipulate files that are identified as executables or shared
>     librares by SELinux.  Libraries that get placed in lib directories get
>     labeled by default as a shared library.  Similarly executables that get
>     placed in a bin or sbin directory get labeled as executables by SELinux.
>     However, if these files get installed in other directories they might not
>     get the correct label.  If prelink is trying to manipulate a file that is
>     not a binary or share library this may indicate an intrusion attack.
> 
> Allowing Access
>     You can alter the file context by executing chcon -t bin_t viruskiller or
>     chcon -t lib_t viruskiller if it is a shared library.  If you want to make
>     these changes permanant you must execute the semanage command. semanage
>     fcontext -a -t bin_t viruskiller or semanage fcontext -a -t shlib_t
>     viruskiller. If you feel this executable/shared library  is in the wrong
>     location please file a bug against the package that includes the file,  if
>     you feel that SELinux should know about this file and label it correctly
>     please file a bug against
>     http://bugzilla.redhat.com/bugzilla/enter_bug.cgi.
> 
> Additional Information        
> 
> Source Context                system_u:system_r:prelink_t:SystemLow-SystemHigh
> Target Context                system_u:object_r:usr_t
> Target Objects                viruskiller [ file ]
> Affected RPM Packages         
> Policy RPM                    
> Selinux Enabled               
> Policy Type                   
> MLS Enabled                   
> Enforcing Mode                
> Plugin Name                   plugins.prelink_mislabled
> Host Name                     
> Platform                      
> Alert Count                   1
> Line Numbers                  1
> 
> 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="viruskiller" pid=5685 scontext=system_u:system_r:prelink_t:s0-s0:c0.c1023
> sgid=0 subj=system_u:system_r:prelink_t:s0-s0:c0.c1023 suid=0 tclass=file
> tcontext=system_u:object_r:usr_t:s0 tty=(none) uid=0
> 
Comment 3 Daniel Walsh 2006-12-19 10:31:17 EST
Probably /usr/share/games/viruskiller
Comment 4 Tim McConnell 2007-02-15 01:02:35 EST
upgrading to selinux-policy-2.4.6-37 and forcing a system relabel resovled this
issue.

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