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 1637416 - RHVH 4.2.7: AVC denied errors (getattr) in audit.log after register to engine
Summary: RHVH 4.2.7: AVC denied errors (getattr) in audit.log after register to engine
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.6
Hardware: Unspecified
OS: Linux
high
high
Target Milestone: rc
: 7.6
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
: 1649077 (view as bug list)
Depends On:
Blocks: 1645271 1653106
TreeView+ depends on / blocked
 
Reported: 2018-10-09 08:53 UTC by cshao
Modified: 2022-03-13 15:42 UTC (History)
21 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1645271 (view as bug list)
Environment:
Last Closed: 2019-08-06 12:52:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
all log (10.91 MB, application/x-gzip)
2018-10-09 08:53 UTC, cshao
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github SELinuxProject refpolicy pull 2 0 None closed sysstat: allow sysstat_t to getattr on mountpoints 2020-02-19 03:09:03 UTC
Red Hat Knowledge Base (Solution) 3689791 0 None None None 2018-11-22 19:59:50 UTC
Red Hat Product Errata RHBA-2019:2127 0 None None None 2019-08-06 12:53:15 UTC

Description cshao 2018-10-09 08:53:43 UTC
Created attachment 1491997 [details]
all log

Description of problem:
After register to engine, there are AVC denied errors (getattr) in audit.log.

Version-Release number of selected component (if applicable):
RHVH-4.2-20181004.3-RHVH-x86_64-dvd1.iso
imgbased-1.0.25-1.el7ev.noarch
selinux-policy-3.13.1-229.el7.noarch

How reproducible:
80%

Steps to Reproduce:
1. RHVH-4.2-20181004.3-RHVH-x86_64-dvd1.iso installed successful. selinux in enforcing mode as default.
2. Register RHVH to RHVM.
3. Login to RHVH.

# grep "avc:  denied" /var/log/audit/audit.log
type=AVC msg=audit(1539074401.555:1207): avc:  denied  { getattr } for  pid=29850 comm="sadc" path="/var/log/audit" dev="dm-6" ino=2 scontext=system_u:system_r:sysstat_t:s0-s0:c0.c1023 tcontext=system_u:object_r:auditd_log_t:s0 tclass=dir permissive=0


Actual results:
AVC denied error msgs in audit.log

Expected results:
No avc denied errors in audit.log.

Additional info:

Comment 1 Yuval Turgeman 2018-10-11 13:52:08 UTC
It looks like a platform bug - does this happen on RHEL-H as well ?

Comment 2 cshao 2018-10-12 09:07:53 UTC
(In reply to Yuval Turgeman from comment #1)
> It looks like a platform bug - does this happen on RHEL-H as well ?

Yes, but there are a few differences on RHEL-H.

# grep "avc:  denied" /var/log/audit/audit.log
type=AVC msg=audit(1539331410.911:1741): avc:  denied  { sendto } for  pid=1565 comm="chronyd" path="/run/chrony/chronyc.20590.sock" scontext=system_u:system_r:chronyd_t:s0 tcontext=system_u:system_r:virtd_t:s0-s0:c0.c1023 tclass=unix_dgram_socket

Comment 4 Yuval Turgeman 2018-10-14 17:46:31 UTC
Ok I've just reproduced this on a RHEL system - it is indeed a platform bug, to reproduce this, you need to install the operating system with /var/log/audit mounted on a separate partition, then you will start seeing those denials.  Is this a known issue ?

Comment 20 cshao 2018-11-14 07:10:34 UTC
Still met this issue with RHVH 4.2.7 async build

Comment 22 James Ralston 2018-11-14 18:18:40 UTC
If /var/log/audit is a separate filesystem, simply installing the sysstat package will also show the problem. From BZ#1649077:

$ ausearch -m avc -ts today | audit2allow 

#============= sysstat_t ==============

allow sysstat_t auditd_log_t:dir getattr;

Note that the RHEL7 STIG requires /var/log/audit to be a separate filesystem:

https://stigviewer.com/stig/red_hat_enterprise_linux_7/2017-12-14/finding/V-72063

Therefore, all sites that must run STIG-compliant RHEL7 hosts are going to be bitten by this.

At least for now, we're only seeing this for sysstat_t, so we've rolled another tunable into our local policy to permit us to work around the issue:

## <desc>
##  <p>
##    Work around auditd_log_t denials (BZ#1637416).
##  </p>
## </desc>

gen_tunable(local_custom_auditd_log_getattr, true)

gen_require(`
    type auditd_log_t;
    type sysstat_t;
    class dir { getattr };
')

tunable_policy(`local_custom_auditd_log_getattr',`
    allow sysstat_t auditd_log_t:dir getattr;
')

Comment 27 Zdenek Pytela 2019-03-06 17:35:12 UTC
*** Bug 1649077 has been marked as a duplicate of this bug. ***

Comment 30 errata-xmlrpc 2019-08-06 12:52:32 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://access.redhat.com/errata/RHBA-2019:2127


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