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 1463829 - rule_mount_option_var_tmp_bind discrepancy between OVAL and remediation
Summary: rule_mount_option_var_tmp_bind discrepancy between OVAL and remediation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: scap-security-guide
Version: 7.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Matěj Týč
QA Contact: Marek Haicman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-21 20:26 UTC by Marek Haicman
Modified: 2018-10-30 11:47 UTC (History)
2 users (show)

Fixed In Version: scap-security-guide-0.1.40-7.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 11:46:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3308 0 None None None 2018-10-30 11:47:23 UTC

Description Marek Haicman 2017-06-21 20:26:16 UTC
Description of problem:
Rule xccdf_org.ssgproject.content_rule_mount_option_var_tmp_bind is currently defined in such way it cannot be remedied. OVAL checks runtime, and remediation deals solely with /etc/fstab.

Version-Release number of selected component (if applicable):
scap-security-guide-0.1.33-5.el7.noarch

How reproducible:
reliably

Steps to Reproduce:
1. make two entries into /etc/fstab, separately for /tmp and /var/tmp
2. run remediation
3. check runtime and contents of /etc/fstab

Actual results:
fstab is updated to include binding mount of /tmp to /var/tmp. Runtime is still failing

Expected results:
Runtime is fixed together with fstab, by remounting

Additional info:

Comment 1 Watson Yuuma Sato 2018-07-31 16:15:07 UTC
I believe this is addressed by this PR: https://github.com/OpenSCAP/scap-security-guide/pull/2696

The mount_option rules were templated and now the generated remediations (ansible and bash) can mount the partition.

Comment 3 Marek Haicman 2018-09-20 16:28:09 UTC
Verified fix in version scap-security-guide-0.1.40-7.el7

[dahaic@dhcp-24-168 tests]$ sudo ./datastream_chaining.sh ./0.1.36-7b.rhel7.ds.xml ./0.1.40-7b.rhel7.ds.xml --libvirt qemu:///system rhel7.6 --xccdf-id scap_org.open-scap_cref_ssg-rhel7-xccdf-1.2.xml rule_mount_option_var_tmp_bind
Tested with SSG Test Suite, on the commit
commit 87695e43ad73b1b9d008b8b5dc0ff8cce586c3ce
With command line arguments: --libvirt qemu:///system rhel7.6 --xccdf-id scap_org.open-scap_cref_ssg-rhel7-xccdf-1.2.xml rule_mount_option_var_tmp_bind

DataStream used (md5) : 9f4e3926d2b2672f274b74043daf0650 ./0.1.36-7b.rhel7.ds.xml
Setting console output to log level INFO
INFO - The base image option has not been specified, choosing libvirt-based test environment.
INFO - Logging into /home/dahaic/RH/git/upstream/dahaic/scap-security-guide/tests/logs/rule-custom-2018-09-20-1707/test_suite.log
INFO - xccdf_org.ssgproject.content_rule_mount_option_var_tmp_bind
INFO - Script configured_and_mounted.pass.sh using profile xccdf_org.ssgproject.content_profile_C2S OK
INFO - Script just_configured.fail.sh using profile xccdf_org.ssgproject.content_profile_C2S OK
ERROR - Scan has exited with return code 2, instead of expected 0 during stage remediation
ERROR - The remediation failed for rule 'xccdf_org.ssgproject.content_rule_mount_option_var_tmp_bind'.
ERROR - Script just_mounted.fail.sh using profile xccdf_org.ssgproject.content_profile_C2S found issue:
ERROR - Scan has exited with return code 0, instead of expected 2 during stage initial
ERROR - The initial scan failed for rule 'xccdf_org.ssgproject.content_rule_mount_option_var_tmp_bind'.
ERROR - Script separated_and_mounted.fail.sh using profile xccdf_org.ssgproject.content_profile_C2S found issue:
ERROR - Scan has exited with return code 0, instead of expected 2 during stage initial
ERROR - The initial scan failed for rule 'xccdf_org.ssgproject.content_rule_mount_option_var_tmp_bind'.
ERROR - Script wrong_bind.fail.sh using profile xccdf_org.ssgproject.content_profile_C2S found issue:
ERROR - Scan has exited with return code 0, instead of expected 2 during stage initial
ERROR - The initial scan failed for rule 'xccdf_org.ssgproject.content_rule_mount_option_var_tmp_bind'.

DataStream used (md5) : 1acf68b67971a44aaed789c0c9ba4af2 ./0.1.40-7b.rhel7.ds.xml
Setting console output to log level INFO
INFO - The base image option has not been specified, choosing libvirt-based test environment.
INFO - Logging into /home/dahaic/RH/git/upstream/dahaic/scap-security-guide/tests/logs/rule-custom-2018-09-20-1708/test_suite.log
libvirt: QEMU Driver error : Guest agent is not responding: QEMU guest agent is not connected
INFO - xccdf_org.ssgproject.content_rule_mount_option_var_tmp_bind
INFO - Script configured_and_mounted.pass.sh using profile xccdf_org.ssgproject.content_profile_C2S OK
INFO - Script just_configured.fail.sh using profile xccdf_org.ssgproject.content_profile_C2S OK
INFO - Script just_mounted.fail.sh using profile xccdf_org.ssgproject.content_profile_C2S OK
INFO - Script separated_and_mounted.fail.sh using profile xccdf_org.ssgproject.content_profile_C2S OK
INFO - Script wrong_bind.fail.sh using profile xccdf_org.ssgproject.content_profile_C2S OK


Note: C2S profile does not select this rule, so test has been performed on updated DS where this rules has been selected.

[dahaic@dhcp-24-168 tests]$ diff 0.1.36-7{,b}.rhel7.ds.xml
52533a52534
>         <select idref="xccdf_org.ssgproject.content_rule_mount_option_var_tmp_bind" selected="true"/>
[dahaic@dhcp-24-168 tests]$ diff 0.1.40-7{,b}.rhel7.ds.xml
59676a59677
>         <select idref="xccdf_org.ssgproject.content_rule_mount_option_var_tmp_bind" selected="true"/>

Comment 5 errata-xmlrpc 2018-10-30 11:46:47 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-2018:3308


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