Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
+++ This bug was initially created as a clone of Bug #1653833 +++
Description of problem:
When a local policy module was created to grant a particular permission
previously reported as denied by audit, sealert reports:
Invalid AVC allowed in current policy
which is confusing and misleads troubleshooting. This error message is not explained neither in the sealert manual page nor in documentation.
Version-Release number of selected component (if applicable):
setroubleshoot-3.3.18-1.fc29.x86_64
How reproducible:
always
Steps to Reproduce:
1. Trigger an AVC
chronyc tracking > /root/avctest
2. Create and insert a custom policy module to grant the permission
echo '(allow chronyc_t admin_home_t (file (write)))' > /tmp/chronyc-write.cil
semodule -i /tmp/chronyc-write.cil
3. Run sealert
sealert -a /var/log/audit/audit.log > /tmp/sealert.txt
/usr/bin/sealert:32: DeprecationWarning: Importing dbus.glib to use the GLib main loop with dbus-python is deprecated.
Instead, use this sequence:
from dbus.mainloop.glib import DBusGMainLoop
DBusGMainLoop(set_as_default=True)
import dbus.glib
type=AVC msg=audit(1543339233.655:381): avc: denied { write } for pid=15235 comm="chronyc" path="/root/avctest" dev="vda1" ino=1747 scontext=unconfined_u:unconfined_r:chronyc_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:admin_home_t:s0 tclass=file permissive=0
**** Invalid AVC allowed in current policy ***
Actual results:
A misleading error message appears on stderr.
Expected results:
The error message is comprehensive or none.
Additional info:
--- Additional comment from Milos Malik on 2018-11-28 11:53:25 CET ---
The same problem is visible on RHEL-8.0 too.
# rpm -qa setr\*
setroubleshoot-server-3.3.18-2.el8.x86_64
setroubleshoot-plugins-3.3.9-3.el8.noarch
#
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 (setroubleshoot bug fix and enhancement update), 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://access.redhat.com/errata/RHBA-2020:4725