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 1084977 - Policy for openlmi-providers, journald provider
Summary: Policy for openlmi-providers, journald provider
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.0
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-07 12:54 UTC by Tomáš Bžatek
Modified: 2015-03-05 10:38 UTC (History)
2 users (show)

Fixed In Version: selinux-policy-3.13.1-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 10:38:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0458 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2015-03-05 15:17:00 UTC

Description Tomáš Bžatek 2014-04-07 12:54:38 UTC
As a continuation of bug 1024787, I have found more AVCs that prevent the journald openlmi provider working properly. Opening a new bugreport to prevent breakage in the late 7.0 cycle.

selinux-policy-3.12.1-151.el7.noarch

Default context of /usr/libexec/pegasus/cmpiLMI_Journald-cimprovagt is "system_u:object_r:pegasus_openlmi_admin_exec_t:s0". Also tried "pegasus_openlmi_system_t" with no difference.

Getting these AVCs in enforcing mode:

type=AVC msg=audit(1396874196.379:403): avc:  denied  { read } for  pid=2371 comm="cimprovagt" name="journal" dev="tmpfs" ino=8225 scontext=system_u:system_r:pegasus_openlmi_admin_t:s0 tcontext=system_u:object_r:syslogd_var_run_t:s0 tclass=dir

Permissive mode reveals several more:

type=AVC msg=audit(1396874661.620:413): avc:  denied  { read } for  pid=2449 comm="cimprovagt" name="journal" dev="tmpfs" ino=8225 scontext=system_u:system_r:pegasus_openlmi_admin_t:s0 tcontext=system_u:object_r:syslogd_var_run_t:s0 tclass=dir

ype=AVC msg=audit(1396874661.620:414): avc:  denied  { read } for  pid=2449 comm="cimprovagt" name="system.journal" dev="tmpfs" ino=8227 scontext=system_u:system_r:pegasus_openlmi_admin_t:s0 tcontext=system_u:object_r:syslogd_var_run_t:s0 tclass=file

type=AVC msg=audit(1396874661.620:414): avc:  denied  { open } for  pid=2449 comm="cimprovagt" path="/run/log/journal/24dd5c5103df43af9792d34744c14b71/system.journal" dev="tmpfs" ino=8227 scontext=system_u:system_r:pegasus_openlmi_admin_t:s0 tcontext=system_u:object_r:syslogd_var_run_t:s0 tclass=file

type=AVC msg=audit(1396874661.620:415): avc:  denied  { getattr } for  pid=2449 comm="cimprovagt" path="/run/log/journal/24dd5c5103df43af9792d34744c14b71/system.journal" dev="tmpfs" ino=8227 scontext=system_u:system_r:pegasus_openlmi_admin_t:s0 tcontext=system_u:object_r:syslogd_var_run_t:s0 tclass=file

type=AVC msg=audit(1396874661.620:416): avc:  denied  { getattr } for  pid=2449 comm="cimprovagt" name="/" dev="tmpfs" ino=1154 scontext=system_u:system_r:pegasus_openlmi_admin_t:s0 tcontext=system_u:object_r:tmpfs_t:s0 tclass=filesystem


This is on recent 7.0 system, where journald is configured to a non-persistent storage I guess, residing in /run/log/journal. In Fedora 20, log files seem to reside in /var/log/journal for persistency. The AVCs are bit different:

type=AVC msg=audit(1396621304.832:1708): avc:  denied  { read } for  pid=17765 comm="cimprovagt" name="journal" dev="dm-1" ino=265576 scontext=system_u:system_r:pegasus_openlmi_admin_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=dir

type=AVC msg=audit(1396621868.351:1737): avc:  denied  { read } for  pid=17922 comm="cimprovagt" name="user-1000.journal" dev="dm-1" ino=266988 scontext=system_u:system_r:pegasus_openlmi_admin_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file

type=AVC msg=audit(1396621868.351:1737): avc:  denied  { open } for  pid=17922 comm="cimprovagt" path="/var/log/journal/f171ae8c7b22634415aecd50465d9ef2/user-1000.journal" dev="dm-1" ino=266988 scontext=system_u:system_r:pegasus_openlmi_admin_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file

Would be great to cover both cases for RHEL 7.1 in case somebody turns persistency on.

Comment 1 Tomáš Bžatek 2014-04-07 13:04:30 UTC
Steps to repro:

$ lmishell -n
> c = connect("localhost", "root", "password")
> i = c.root.cimv2.LMI_JournalMessageLog.first_instance()
> r = i.PositionToFirstRecord()
> print r
LMIReturnValue(rval=2, rparams=NocaseDict({}), errorstr='')

^^ the rval should be zero and rparams dict should not be empty, switching to Permissive mode returns valid data.

Comment 2 Miroslav Grepl 2014-09-09 07:35:05 UTC
#============= pegasus_openlmi_admin_t ==============

#!!!! This avc is allowed in the current policy
allow pegasus_openlmi_admin_t syslogd_var_run_t:dir read;

#!!!! This avc is allowed in the current policy
allow pegasus_openlmi_admin_t syslogd_var_run_t:file { read getattr open };

#!!!! This avc is allowed in the current policy
allow pegasus_openlmi_admin_t tmpfs_t:filesystem getattr;

#!!!! This avc is allowed in the current policy
allow pegasus_openlmi_admin_t var_log_t:dir read;

#!!!! This avc is allowed in the current policy
allow pegasus_openlmi_admin_t var_log_t:file { read open };

Comment 7 errata-xmlrpc 2015-03-05 10:38:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0458.html


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