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 2185176 - Failed to locate a datastream with ID matching 'scap_org.open-scap_datastream_from_xccdf_ssg-rhel8-xccdf-1.2.xml' ID
Summary: Failed to locate a datastream with ID matching 'scap_org.open-scap_datastream...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: scap-security-guide
Version: 8.7
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Jan Černý
QA Contact: BaseOS QE Security Team
Jan Fiala
URL:
Whiteboard:
Depends On:
Blocks: 2190172 2223647 2223966 2223967
TreeView+ depends on / blocked
 
Reported: 2023-04-07 10:25 UTC by Masahiro Matsuya
Modified: 2023-09-15 10:28 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 2190172 2223647 2223966 2223967 (view as bug list)
Environment:
Last Closed: 2023-07-19 15:00:46 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-154232 0 None None None 2023-04-07 10:27:03 UTC
Red Hat Knowledge Base (Solution) 7009522 0 None None None 2023-05-02 07:55:51 UTC

Description Masahiro Matsuya 2023-04-07 10:25:21 UTC
Description of problem:

RHEL8.7 installation with CDN repository outputs the following error in pop-up dialog window.

Something went wrong during the final hardening: Content evaluation and remediation with the oscap tool failed: OpenSCAP Error: Failed to locate a datastream with ID matching 'scap_org.open-scap_datastream_from_xccdf_ssg-rhel8-xccdf-1.2.xml' ID and checklist inside matching 'scap_org.open-scap_cref_ssg-rhel8-xccdf-1.2.xml' ID. [/builddir/build/BUILD/openscap-1.3.6/src/DS/ds_sds_session.c:223]


This is caused by the datastream id changed in the latest scap-security-guide package.

With scap-security-guide-0.1.63-4.el8.noarch (in 8.7GA):

# grep datastream /usr/share/xml/scap/ssg/content/ssg-rhel8-ds.xml
  <ds:data-stream id="scap_org.open-scap_datastream_from_xccdf_ssg-rhel8-xccdf-1.2.xml" scap-version="1.3" use-case="OTHER">


With scap-security-guide-0.1.66-2.el8_7.noarch.rpm:

# grep datastream /usr/share/xml/scap/ssg/content/ssg-rhel8-ds.xml
  <ds:data-stream id="scap_org.open-scap_datastream_from_xccdf_ssg-rhel8-xccdf.xml" scap-version="1.3" use-case="OTHER">


In shorts, "-1.2" was removed from datastream id in the latest scap-security-guide package. 


The datastream id is taken from /usr/share/xml/scap/ssg/content/ssg-rhel8-ds.xml in the stage2 image, when GUI spoke for security profile finishes.

But, the remediate is executed in the chroot environment after latest package installation. So, the saved datastream id doesn't match with the one in the latest package, and the error is output.

Maybe, it's required to pick up the datastream id again from the latest package just before remediate is executed.


Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux 

How reproducible:
Always

Steps to Reproduce:
1. Start GUI installation of RHEL8.7
2. Select any security profile like stig
3. Register the host into Customer Portal (CDN)
4. Set CDN as the package repository
5. Start the installation

Actual results:

The following error is output, and installation stops. (it can be resumed by pressing button)

Something went wrong during the final hardening: Content evaluation and remediation with the oscap tool failed: OpenSCAP Error: Failed to locate a datastream with ID matching 'scap_org.open-scap_datastream_from_xccdf_ssg-rhel8-xccdf-1.2.xml' ID and checklist inside matching 'scap_org.open-scap_cref_ssg-rhel8-xccdf-1.2.xml' ID.


Expected results:

Any error is not output. The installation completes without stopping in any popup dialog window.

Additional info:

Comment 2 Matěj Týč 2023-04-26 16:09:41 UTC
Kudos to Masahiro for the great analysis,
this issue is caused by unexpected interaction between the scap-security-guide content project's build system that determines the datastream ID, recent z-stream content updates across many RHEL releases, and by a way how the addon works in the GUI installation mode.

The issue can't be fixed easily for existing RHELs, as the addon is already on those affected installation images, and changing the datastream ID again would cause problems elsewhere.
I can advise to use workarounds that we will draft, or to wait for the next minor version that won't suffer from this issue.

Comment 5 Jan Černý 2023-07-18 08:33:52 UTC
This problem has been triggered by a change in the scap-security-guide package. The fix will be implemented in the scap-security-guide package, we won't change the oscap-anaconda-addon component when fixing this bug. Therefore, I'm switching the bug to scap-security-guide component.

Comment 11 Jan Černý 2023-07-19 15:00:46 UTC
This bug isn't reproducible in RHEL 8.9, because the `scap-security-guide` RPM package shipped in RHEL 8.9 installation image already contains the data stream ID without the `-1.2.` suffix, so there is no difference between the IDs in the content in the installation image and the content in the repository, so the bug can't happen.

For the resolution on RHEL 8.6 z-stream, please track the 8.6.z clone: https://bugzilla.redhat.com/show_bug.cgi?id=2223967.


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