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: 2020-04-28 15:30 UTC (History)
9 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:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1583 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.