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 1465478 - scap-workbench incorrectly handles default values, possibly caused by broken profile resolution implementation
Summary: scap-workbench incorrectly handles default values, possibly caused by broken ...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: scap-workbench
Version: ---
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.0
Assignee: Matěj Týč
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-27 13:56 UTC by Marek Haicman
Modified: 2020-12-01 07:29 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-12-01 07:29:07 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Marek Haicman 2017-06-27 13:56:19 UTC
Description of problem:
Rule ipv4_conf_all_secure_redirects does not use value defined by the profile, but some internal one. This is easily observable in scap-security-guide-0.1.30-3.el7.noarch, where value default should be [it's a bug actually] 1, but scan passes for 0. Only after selecting one in the tailoring (or selecting profile nist-cn-il-al, which has explicit "enable" in the profile), it starts failing.

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

How reproducible:
reliably

Steps to Reproduce:
1. prepare machine to have runtime and configuration of ipv4_conf_all_secure_redirects = 0
2. scan with default 0.1.30-3 scap-security-guide
3. scan with re-selected value = 1

Actual results:
2) passing
3) failing

Expected results:
2) failing
3) failing

Additional info:

Comment 1 Marek Haicman 2017-06-27 14:03:58 UTC
I am sorry, this is actually display bug in scap-workbench - C2S profile I have tested it on has explicit "disable" value, but scap-workbench still shows value as "1". If I use nist-cn-il-al, it fails correctly [i.e. 1 is expected] and when rule is enabled for different profile, it also expects 1 (i.e. value default).

Comment 2 Marek Haicman 2017-12-14 17:31:20 UTC
With the addition of sshd_required value, this bug is MUCH more annoying. All profiles has sshd_required listed as "0" that means unset - act based on whether sshd is installed or not. But most of the profiles actually has "2" - sshd is required to be installed and configured properly.

Comment 3 Marek Haicman 2017-12-14 18:09:50 UTC
Simple new reproducer:
1. open RHEL7 datastream (0.1.36-6 is version I tested)
2. select CJIS profile, customize/deselect, reselect only rule_accounts_maximum_age_login_defs
3. notice that value it depends on is printed as "60" days
4. scan + remediate target machine

Result:
Machine has 90 days set - this is correct, as CJIS has profile override of value selector to 90 days. But the value has default in definition 60 days, and thats what SCAP Workbench shows.

Comment 5 Marek Haicman 2019-08-22 20:06:12 UTC
This issue was not selected to be included in Red Hat Enterprise Linux 7.8 because it is seen either as low or moderate impact to a small number of use-cases. The next release will be in Maintenance Support 1 Phase, which means that qualified Critical and Important Security errata advisories (RHSAs) and Urgent Priority Bug Fix errata advisories (RHBAs) may be released as they become available. We are deferring this issue to Red Hat Enterprise Linux 8, but if you believe that it qualifies for the Maintenance Support 1 Phase, please re-open.

Comment 6 Jan Černý 2020-02-27 08:49:02 UTC
I have looked into this problem quickly. I have found that the value of variable displayed in the box under the "Depends on Values" label is obtained by method TailoringWindow::getCurrentValueValue from TailoringWindow.cpp line 435. This method calls function xccdf_policy_get_value_of_item from libopenscap. However, during my experiments, xccdf_policy_get_value_of_item always returned the default values of XCCDF Values instead of the values of XCCDF Values selected in the profile. The problem occured when the selections in the child profile were not modified by the user. It seems that inheritance from the parent profile was not effective. By debugging, I have discovered that the xccdf_profile structure that I obtained from xccdf_policy structure at the moment TailoringWindow::getCurrentValueValue is invoked  doesn't contain any set_values or refine_values. For example, xccdf_profile_get_refine_values returned empty iterator. That is unexpected result because the parent profile I customized (pci-dss) contained many refine-value elements. I suspect the parent profile value selections (refinements) were not considered by xccdf_policy_get_value_of_item. Or, in other words, the child profile that is underlying the Tailoring Window was not resolved. I have found that the underlying profile is initialized in MainWindow::inheritAndEditProfile in MainWindow.cpp line 1357. It is created from scratch. But I haven't been able to find where the profile resolution is performed. Maybe the profile resolution isn't performed. I suspect that profile resolution could mean that the generated tailoring file would contain a full copy of the parent profile, which is a situation that we definitely don't want to happen, but this suspicion needs to be verified or rejected. The OpenSCAP sources contain possibly relevant functions  which I suggest considering, eg. xccdf_tailoring_resolve, xccdf_resolve_item, xccdf_resolve_profile. This is only initial investigation and we need to spend more time on this problem.

Comment 9 RHEL Program Management 2020-12-01 07:29:07 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.


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