Bug 523054

Summary: setroubleshoot: SELinux is preventing /usr/sbin/prelink "unlink" access to deltarpm.cck2GN.
Product: [Fedora] Fedora Reporter: vinod <vinodkmar>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: dwalsh, jkubin, mcepl, mcepl, mgrepl, vinodkmar
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:d3f4e0f873b03eff5bae3a9fbe3a0b33e2a79d300ba4f3412ab199270f2f43f8
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-14 16:46:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description vinod 2009-09-13 18:01:34 UTC
The following was filed automatically by setroubleshoot:

Summary:

SELinux is preventing /usr/sbin/prelink "unlink" access to deltarpm.cck2GN.

Detailed Description:

[prelink has a permissive type (prelink_t). This access was not denied.]

SELinux denied prelink unlink on deltarpm.cck2GN. The prelink program is only
allowed to manipulate files that are identified as executables or shared
libraries 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 'deltarpm.cck2GN'"
or "chcon -t lib_t 'deltarpm.cck2GN'" if it is a shared library. If you want to
make these changes permanent you must execute the semanage command. "semanage
fcontext -a -t bin_t 'deltarpm.cck2GN'" or "semanage fcontext -a -t lib_t
'deltarpm.cck2GN'". 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 SELinux policy.

Additional Information:

Source Context                system_u:system_r:prelink_t:s0-s0:c0.c1023
Target Context                system_u:object_r:rpm_tmp_t:s0
Target Objects                deltarpm.cck2GN [ file ]
Source                        prelink
Source Path                   /usr/sbin/prelink
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           prelink-0.4.2-2.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.31-3.fc12
Selinux Enabled               True
Policy Type                   targeted
MLS Enabled                   True
Enforcing Mode                Enforcing
Plugin Name                   prelink_mislabled
Host Name                     (removed)
Platform                      Linux (removed) 2.6.31-2.fc12.x86_64
                              #1 SMP Thu Sep 10 00:25:40 EDT 2009 x86_64 x86_64
Alert Count                   1
First Seen                    Sun 13 Sep 2009 11:29:28 PM IST
Last Seen                     Sun 13 Sep 2009 11:29:28 PM IST
Local ID                      c4cb359e-336e-4a8b-a7d4-707da240a215
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1252864768.246:85): avc:  denied  { unlink } for  pid=17419 comm="prelink" name="deltarpm.cck2GN" dev=sda7 ino=267 scontext=system_u:system_r:prelink_t:s0-s0:c0.c1023 tcontext=system_u:object_r:rpm_tmp_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1252864768.246:85): arch=c000003e syscall=82 success=yes exit=0 a0=7fff58093c00 a1=7fff58093c40 a2=ec7ea0 a3=1b items=0 ppid=17417 pid=17419 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="prelink" exe="/usr/sbin/prelink" subj=system_u:system_r:prelink_t:s0-s0:c0.c1023 key=(null)


audit2allow suggests:

#============= prelink_t ==============
allow prelink_t rpm_tmp_t:file unlink;

Comment 1 Daniel Walsh 2009-09-14 16:46:53 UTC
Fixed in selinux-policy-3.6.31-4.fc12.noarch