RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 840032 - selinux is preventing rm from unlinking prelink.cache
Summary: selinux is preventing rm from unlinking prelink.cache
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.0
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-13 13:46 UTC by Ondrej Moriš
Modified: 2013-02-15 08:48 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-23 17:32:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ondrej Moriš 2012-07-13 13:46:17 UTC
Gnutls contains a self-test which runs under root priviligues, it contains calling 'rm' (I guess), during the test AVC appers:

Info: Searching AVC errors produced since 1341847120.51 (Mon Jul  9 11:18:40 2012)
Searching logs...
Running '/usr/bin/env LC_ALL=en_US.UTF-8 /sbin/ausearch -m AVC -m USER_AVC -m SELINUX_ERR -ts 07/09/2012 11:18:40 < /dev/null >/mnt/testarea/tmp.rhts-db-submit-result.7DLP0C 2>&1'
----
time->Mon Jul  9 11:23:26 2012
type=AVC msg=audit(1341847406.271:2709): avc:  denied  { unlink } for  pid=50541 comm="rm" name="prelink.cache" dev="dm-2" ino=924345 scontext=system_u:system_r:prelink_cron_system_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:etc_t:s0 tclass=file
Fail: AVC messages found.
Checking for errors...
Using stronger AVC checks.
	Define empty RHTS_OPTION_STRONGER_AVC parameter if this causes any problems.
Running 'cat /mnt/testarea/tmp.rhts-db-submit-result.7DLP0C | /sbin/ausearch -m AVC -m SELINUX_ERR'
Fail: AVC messages found.
Running 'cat %s | /sbin/ausearch -m USER_AVC >/mnt/testarea/tmp.rhts-db-submit-result.7_eFYk 2>&1'
Info: No AVC messages found.
/bin/grep 'avc: ' /mnt/testarea/dmesg.log | /bin/grep --invert-match TESTOUT.log
No AVC messages found in dmesg
Running '/usr/sbin/sestatus'
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      26
Running 'rpm -q selinux-policy || true'
selinux-policy-3.10.0-137.el7.noarch


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

RHEL-7.0-20120709.0

Steps to Reproduce: 

1. download gnutls source rpm, build it and run its self-test (make check)

Comment 1 Miroslav Grepl 2012-07-17 07:34:29 UTC
prelink.cache should be labeled as prelink_cache_t. Is this file create by a test somehow?

Comment 2 Milos Malik 2012-07-17 08:04:38 UTC
Following commands were executed on x86_64 machine where RHEL-7.0-20120711.2 is installed:

# rpm -ivh gnutls-2.12.18-1.el7.src.rpm
# yum -y install guile-devel libtool lzo-devel libtasn1-devel readline-devel zlib-devel p11-kit-devel libgcrypt-devel
# rpmbuild -bc rpmbuild/SPECS/gnutls.spec
# cd rpmbuild/BUILD/gnutls-2.12.18/
# make check
# ausearch -m avc -ts today
<no matches>

Comment 3 Daniel Walsh 2012-07-23 17:32:41 UTC
I guess this is either fixed or is not a bug.


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