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.

Bug 1763982

Summary: Invalid AVC allowed in current policy reported by sealert
Product: Red Hat Enterprise Linux 8 Reporter: Petr Lautrbach <plautrba>
Component: setroubleshootAssignee: Vit Mojzis <vmojzis>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: low Docs Contact:
Priority: medium    
Version: 8.0CC: lvrabec, mmalik, plautrba, vmojzis, zpytela
Target Milestone: rcKeywords: AutoVerified, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 1653833 Environment:
Last Closed: 2020-11-04 03:19:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1653833    
Bug Blocks:    

Description Petr Lautrbach 2019-10-22 06:14:52 UTC
+++ 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
#

Comment 11 errata-xmlrpc 2020-11-04 03:19:38 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 (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