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 1467784 - Openscap scan allows only exactly the list of ciphers for rule ssg-obj_sshd_use_approved_ciphers
Summary: Openscap scan allows only exactly the list of ciphers for rule ssg-obj_sshd_u...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: scap-security-guide
Version: 6.9
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Watson Yuuma Sato
QA Contact: Marek Haicman
URL:
Whiteboard:
Depends On:
Blocks: 1374441 1461138 1507541
TreeView+ depends on / blocked
 
Reported: 2017-07-05 07:10 UTC by dgupte
Modified: 2021-09-09 12:24 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-19 05:22:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1413494 1 None None None 2021-09-09 12:04:49 UTC
Red Hat Product Errata RHBA-2018:1918 0 None None None 2018-06-19 05:23:00 UTC

Description dgupte 2017-07-05 07:10:19 UTC
Description of problem:

Using the profile C2S and  PCI-DSS for Red Hat Enterprise Linux 6, the following test fails

Object oval:ssg-obj_sshd_use_approved_ciphers:obj:1 of type textfilecontent54_object

/etc/ssh/sshd_config	^[\s]*(?i)Ciphers(?-i)[\s]+aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc[\s]*(?:|(?:#.*))?$

This is not a valid test, because it allows only EXACTLY the list of ciphers:
aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc

Customer's systems use only:

aes128-ctr,aes192-ctr,aes256-ctr

All of which are in the list of approved ciphers, and is MORE restrictive than the test, yet the test fails.

It fails because it expects that exact list of ciphers in that exact order.  The test needs to be updated so that instead of a simple match, it actually checks that all listed ciphers are in the approved list (ie, any subset of the approved ciphers in any order should be a vaild test).


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


Additional info:

- There's existing bugzilla (https://bugzilla.redhat.com/show_bug.cgi?id=1413494) for RHEL7 and planned to resolve in RHEL 7.4 release. 

Really need to backport this functionality in RHEL 6 as well.


-------------------
    <ind:textfilecontent54_object id="oval:ssg-obj_sshd_use_approved_ciphers:obj:1" version="2">
      <ind:filepath>/etc/ssh/sshd_config</ind:filepath>
      <ind:pattern operation="pattern match">^[\s]*(?i)Ciphers(?-i)[\s]+aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc[\s]*(?:|(?:#.*))?$</ind:pattern>
-------------------

Comment 7 Matěj Týč 2018-02-26 12:11:57 UTC
Fixed in upstream by https://github.com/OpenSCAP/scap-security-guide/pull/1767

Comment 10 Marek Haicman 2018-04-25 22:32:42 UTC
Verified fix in scap-security-guide-0.1.28-4.el6 via upstream SSG Test Suite:
https://github.com/OpenSCAP/scap-security-guide/commit/3398c06a4b42e4518479d5b1276b65fb2cf89125

NEW (scap-security-guide-0.1.28-4.el6):
[dahaic@dhcp-24-168 tests]$ sudo ./test_suite.py rule --hypervisor qemu:///system --domain ssg-test-suite-6 --datastream ssg-6.10.xml --xccdf-id scap_org.open-scap_cref_ssg-rhel6-xccdf-1.2.xml --dontclean sshd_use_approved_ciphers
Setting console output to log level INFO
INFO - xccdf_org.ssgproject.content_rule_sshd_use_approved_ciphers
INFO - Script comment.fail.sh using profile xccdf_org.ssgproject.content_profile_C2S OK
INFO - Script correct_reduced_list.pass.sh using profile xccdf_org.ssgproject.content_profile_C2S OK

OLD (scap-security-guide-0.1.28-3.el6):
[dahaic@dhcp-24-168 tests]$ sudo ./test_suite.py rule --hypervisor qemu:///system --domain ssg-test-suite-6 --datastream ssg-6.9.xml --xccdf-id scap_org.open-scap_cref_ssg-rhel6-xccdf-1.2.xml --dontclean sshd_use_approved_ciphers
Setting console output to log level INFO
INFO - xccdf_org.ssgproject.content_rule_sshd_use_approved_ciphers
INFO - Script comment.fail.sh using profile xccdf_org.ssgproject.content_profile_C2S OK
ERROR - Script correct_reduced_list.pass.sh using profile xccdf_org.ssgproject.content_profile_C2S found issue:
ERROR - Scan has exited with return code 2, instead of expected 0 during stage initial

Comment 13 errata-xmlrpc 2018-06-19 05:22:53 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:1918


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