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 1284743 - SELinux prevents rhsmcertd from access to rhsm.log
Summary: SELinux prevents rhsmcertd from access to rhsm.log
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.2
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-24 04:59 UTC by Stef Walter
Modified: 2017-08-23 20:55 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-23 20:55:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Stef Walter 2015-11-24 04:59:04 UTC
Description of problem:

The following audit lines are showing up on RHEL 7:

type=1400 audit(1448312410.137:4): avc:  denied  { append } for  pid=1480 comm="rhsmcertd-worke" name="rhsm.log" dev="vda3" ino=17610297 scontext=system_u:system_r:rhsmcertd_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=file
type=1400 audit(1448312410.596:6): avc:  denied  { append } for  pid=1482 comm="rhsmcertd-worke" name="rhsm.log" dev="vda3" ino=17610297 scontext=system_u:system_r:rhsmcertd_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=file

This is happening during a test. I'm not sure exactly the userside actions that are causing it, but it's still a bug.

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

subscription-manager-1.15.9-6.el7.x86_64
selinux-policy-targeted-3.13.1-44.el7.noarch

How reproducible:

Rarely, here's a log:

https://fedorapeople.org/groups/cockpit/logs/pull-3215-ec2a56f9-rhel-7/TestMultiMachine-testTroubleshooting-10.111.127.103-FAIL.log

Comment 2 Milos Malik 2015-12-01 07:09:21 UTC
The rhsm.log file is mislabeled, because correct SELinux context for that file is:

# matchpathcon /var/log/rhsm/rhsm.log
/var/log/rhsm/rhsm.log	system_u:object_r:rhsmcertd_log_t:s0
#

Unfortunately, it's difficult to say why it got mislabeled. Following command fixes the label:

# restorecon -Rv /var/log/rhsm

Let us known if you find out what sequence of steps led to the mislabeled state.

Comment 3 Stef Walter 2015-12-10 11:25:57 UTC
I'll try. This happens rarely. I'll setup a bit on the cockpit integration tests so we can build up a corpus of failures over time for this bug.

Comment 6 Milos Malik 2017-08-17 07:57:02 UTC
Is it still relevant? Do you still see unlabeled_t files on your file-systems?

Comment 7 Stef Walter 2017-08-21 06:56:37 UTC
This stopped happening in March 2016. It's unclear whether Cockpit's Integration tests no longer found this case, or whether the bug was actually fixed.

Automated continuous integration occurances were tracked here:

https://github.com/cockpit-project/cockpit/issues/3703

Comment 8 Lukas Vrabec 2017-08-23 20:55:08 UTC
Thanks for info.


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