Bug 874296

Summary: SELinux is preventing /usr/bin/cp from 'relabelfrom' accesses on the file /var/lib/prelink/quick.
Product: [Fedora] Fedora Reporter: Rob <robertfarmer37>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:a3b2dc4af837d03e00ed323170e3b2b843dc6fed3043118c4fcab6e3896c5b29
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-20 16:21:47 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:
Attachments:
Description Flags
File: type
none
File: hashmarkername none

Description Rob 2012-11-07 21:00:07 UTC
Additional info:
libreport version: 2.0.18
kernel:         3.6.3-1.fc17.x86_64

description:
:SELinux is preventing /usr/bin/cp from 'relabelfrom' accesses on the file /var/lib/prelink/quick.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that cp should be allowed relabelfrom access on the quick file by default.
:Then you should report this as a bug.
:You can generate a local policy module to allow this access.
:Do
:allow this access for now by executing:
:# grep cp /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:prelink_cron_system_t:s0-s0:c0.c
:                              1023
:Target Context                unconfined_u:object_r:prelink_var_lib_t:s0
:Target Objects                /var/lib/prelink/quick [ file ]
:Source                        cp
:Source Path                   /usr/bin/cp
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           coreutils-8.15-7.fc17.x86_64
:Target RPM Packages           prelink-0.4.6-5.fc17.x86_64
:Policy RPM                    selinux-policy-3.10.0-156.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.6.3-1.fc17.x86_64 #1 SMP Mon Oct
:                              22 15:32:35 UTC 2012 x86_64 x86_64
:Alert Count                   6
:First Seen                    2012-09-24 21:17:08 BST
:Last Seen                     2012-11-07 20:44:07 GMT
:Local ID                      cc5b4ffe-db0f-4f2d-b548-18b22aee29ae
:
:Raw Audit Messages
:type=AVC msg=audit(1352321047.267:84): avc:  denied  { relabelfrom } for  pid=2692 comm="cp" name="quick" dev="dm-1" ino=131550 scontext=system_u:system_r:prelink_cron_system_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:prelink_var_lib_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1352321047.267:84): arch=x86_64 syscall=fsetxattr success=no exit=EACCES a0=4 a1=7fff4368fb50 a2=1980930 a3=2b items=0 ppid=2685 pid=2692 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3 comm=cp exe=/usr/bin/cp subj=system_u:system_r:prelink_cron_system_t:s0-s0:c0.c1023 key=(null)
:
:Hash: cp,prelink_cron_system_t,prelink_var_lib_t,file,relabelfrom
:
:audit2allow
:
:#============= prelink_cron_system_t ==============
:#!!!! This avc is a constraint violation.  You will need to add an attribute to either the source or target type to make it work.
:#Constraint rule: 
:allow prelink_cron_system_t prelink_var_lib_t:file relabelfrom;
:
:audit2allow -R
:
:#============= prelink_cron_system_t ==============
:#!!!! This avc is a constraint violation.  You will need to add an attribute to either the source or target type to make it work.
:#Constraint rule: 
:allow prelink_cron_system_t prelink_var_lib_t:file relabelfrom;
:


Potential duplicate bug: 689035

Comment 1 Rob 2012-11-07 21:00:10 UTC
Created attachment 640377 [details]
File: type

Comment 2 Rob 2012-11-07 21:00:14 UTC
Created attachment 640378 [details]
File: hashmarkername

Comment 3 Miroslav Grepl 2012-11-08 07:49:53 UTC
Added.

commit 1c323e47b458e20becf9390e405ff42a3479d595
Author: Miroslav Grepl <mgrepl>
Date:   Thu Nov 8 08:48:29 2012 +0100

    Allow prelink_cron_system_t to overide user componant when cp -a

Comment 4 Fedora Update System 2012-11-21 11:53:05 UTC
selinux-policy-3.10.0-161.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-161.fc17

Comment 5 Fedora Update System 2012-11-22 03:55:00 UTC
Package selinux-policy-3.10.0-161.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.10.0-161.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-18787/selinux-policy-3.10.0-161.fc17
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2012-12-20 16:21:48 UTC
selinux-policy-3.10.0-161.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.