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 1754919 - Audit rules error when remediating machine to PCI-DSS profile
Summary: Audit rules error when remediating machine to PCI-DSS profile
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: scap-security-guide
Version: 8.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 8.2
Assignee: Watson Yuuma Sato
QA Contact: Matěj Týč
Mirek Jahoda
URL:
Whiteboard:
Depends On: 1754550
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-24 11:19 UTC by Matus Marhefka
Modified: 2023-08-02 11:16 UTC (History)
10 users (show)

Fixed In Version: scap-security-guide-0.1.46-2.el8
Doc Type: Bug Fix
Doc Text:
.`scap-security-guide` PCI-DSS remediations of Audit rules now work properly Previously, the `scap-security-guide` package contained a combination of remediation and a check that could result in one of the following scenarios: * incorrect remediation of Audit rules * scan evaluation containing false positives where passed rules were marked as failed Consequently, during the RHEL installation process, scanning of the installed system reported some Audit rules as either failed or errored. With this update, the remediations have been fixed, and scanning of the system installed with the PCI-DSS security policy no longer reports false positives for Audit rules.
Clone Of: 1754550
Environment:
Last Closed: 2020-04-28 15:30:41 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1583 0 None None None 2020-04-28 15:30:58 UTC

Description Matus Marhefka 2019-09-24 11:19:12 UTC
+++ This bug was initially created as a clone of Bug #1754550 +++

Description of problem:
Some audit rules are erroring when remediating machine to PCI-DSS profile. List of rules:

xccdf_org.ssgproject.content_rule_audit_rules_dac_modification_setxattr
xccdf_org.ssgproject.content_rule_audit_rules_dac_modification_removexattr
xccdf_org.ssgproject.content_rule_audit_rules_dac_modification_fsetxattr
xccdf_org.ssgproject.content_rule_audit_rules_dac_modification_fchownat
xccdf_org.ssgproject.content_rule_audit_rules_dac_modification_lremovexattr
xccdf_org.ssgproject.content_rule_audit_rules_dac_modification_fchmodat
xccdf_org.ssgproject.content_rule_audit_rules_dac_modification_fchown
xccdf_org.ssgproject.content_rule_audit_rules_dac_modification_lchown
xccdf_org.ssgproject.content_rule_audit_rules_dac_modification_fremovexattr
xccdf_org.ssgproject.content_rule_audit_rules_dac_modification_fchmod
xccdf_org.ssgproject.content_rule_audit_rules_dac_modification_lsetxattr
xccdf_org.ssgproject.content_rule_audit_rules_dac_modification_chmod
xccdf_org.ssgproject.content_rule_audit_rules_dac_modification_chown
xccdf_org.ssgproject.content_rule_audit_rules_time_clock_settime
xccdf_org.ssgproject.content_rule_audit_rules_time_settimeofday
xccdf_org.ssgproject.content_rule_audit_rules_time_stime
xccdf_org.ssgproject.content_rule_audit_rules_time_adjtimex
xccdf_org.ssgproject.content_rule_audit_rules_kernel_module_loading_delete
xccdf_org.ssgproject.content_rule_audit_rules_kernel_module_loading_finit
xccdf_org.ssgproject.content_rule_audit_rules_kernel_module_loading_init
xccdf_org.ssgproject.content_rule_audit_rules_login_events
xccdf_org.ssgproject.content_rule_audit_rules_file_deletion_events_unlink
xccdf_org.ssgproject.content_rule_audit_rules_file_deletion_events_renameat
xccdf_org.ssgproject.content_rule_audit_rules_file_deletion_events_unlinkat
xccdf_org.ssgproject.content_rule_audit_rules_file_deletion_events_rename
xccdf_org.ssgproject.content_rule_audit_rules_file_deletion_events_rmdir
xccdf_org.ssgproject.content_rule_audit_rules_networkconfig_modification
xccdf_org.ssgproject.content_rule_audit_rules_media_export


Version-Release number of selected component (if applicable):
scap-security-guide-0.1.46-1.el8.noarch


How reproducible:
100%


Steps to Reproduce:
1. Remediate RHEL 8.1 machine with openscap: `oscap xccdf eval --remediate --profile pci-dss /usr/share/xml/scap/ssg/content/ssg-rhel8-ds.xml`


Actual results:
Audit rules are erroring.


Expected results:
Audit rules are passing/fixed.


Additional info:
Output from the remediation:
Fix execution completed and returned: 0
sed: can't read : No such file or directory
/tmp/oscap.z3ROMP/fix-XXASOJzI: line 227: : No such file or directory
sed: can't read : No such file or directory
/tmp/oscap.z3ROMP/fix-XXASOJzI: line 227: : No such file or directory
Failed to verify applied fix: Checking engine returns: fail

Comment 1 Matus Marhefka 2019-09-27 11:32:41 UTC
Following PR fixes one of the issues in the shared/bash_remediation_functions/fix_audit_syscall_rule.sh: https://github.com/ComplianceAsCode/content/pull/4791

Comment 2 Watson Yuuma Sato 2019-10-04 11:59:49 UTC
PR https://github.com/ComplianceAsCode/content/pull/4886 fixes rule:
xccdf_org.ssgproject.content_rule_audit_rules_login_events

Comment 3 Watson Yuuma Sato 2019-10-04 12:29:44 UTC
PR https://github.com/ComplianceAsCode/content/pull/4888 fixes evaluation of rule:
xccdf_org.ssgproject.content_rule_audit_rules_unsuccessful_file_modification

Which started to fail with merge of https://github.com/ComplianceAsCode/content/pull/4791

Comment 6 Watson Yuuma Sato 2019-10-09 13:38:44 UTC
This PR is also important to fix the audit bash functions: https://github.com/ComplianceAsCode/content/pull/4881

Comment 13 errata-xmlrpc 2020-04-28 15:30:41 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-2020:1583


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