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 1966612 - [RFE] SCAP source data stream digital signature validation
Summary: [RFE] SCAP source data stream digital signature validation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: openscap
Version: 8.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: beta
: ---
Assignee: Jan Černý
QA Contact: Matus Marhefka
Jan Fiala
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-01 14:00 UTC by Jan Černý
Modified: 2023-01-07 21:36 UTC (History)
4 users (show)

Fixed In Version: openscap-1.3.5-2.el8
Doc Type: Enhancement
Doc Text:
.Validation of digitally signed SCAP source data streams To conform with the Security Content Automation Protocol (SCAP) 1.3 specifications, OpenSCAP now validates digital signatures of digitally signed SCAP source data streams. As a result, OpenSCAP validates the digital signature when evaluating a digitally signed SCAP source data stream. The signature validation is performed automatically while loading the file. Data streams with invalid signatures are rejected, and OpenSCAP does not evaluate their content. OpenSCAP uses the https://www.aleksey.com/xmlsec/[XML Security Library] with the OpenSSL cryptography library to validate the digital signature. You can skip the signature validation by adding the `--skip-signature-validation` option to the `oscap xccdf eval` command. IMPORTANT: OpenSCAP does not address the trustworthiness of certificates or public keys that are part of the `KeyInfo` signature element and that are used to verify the signature. You should verify such keys by yourselves to prevent evaluation of data streams that have been modified and signed by bad actors.
Clone Of:
Environment:
Last Closed: 2021-11-09 18:04:06 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2021:4192 0 None None None 2021-11-09 18:04:16 UTC

Description Jan Černý 2021-06-01 14:00:32 UTC
Description of problem:
As of SCAP 1.3 specification, Section 4.2 Source Data Streams, page 30:

Content consumers SHOULD validate XML digital signatures if they exist in the content. Validating a signature includes confirming that the signature value is valid, all of the reference hashes in the signature and manifest are correct, and the public key used to verify the signature is from a trusted source. A data stream with a signature that does not validate SHOULD NOT be evaluated by a content consumer.

The implementation should follow TMSAD specification.

It is also required by SCAP 1.3 validation program test requirements, requirement SCAP.R.900.

Version-Release number of selected component (if applicable):
openscap-1.3.4-5

How reproducible:
always

Steps to Reproduce:
1. get a digitally signed SCAP 1.3 source data stream
2. pass it to oscap xccdf eval

Actual results:
signature isn't verified

Expected results:
signature is verified, source data streams with an invalid singature are rejected

Additional info:
Fixed upstream by https://github.com/OpenSCAP/openscap/pull/1684 and https://github.com/OpenSCAP/openscap/pull/1719. The fixes are part of OpenSCAP 1.3.5 upstream release.

This BZ has been spun off from the https://bugzilla.redhat.com/show_bug.cgi?id=1815157. That BZ has a broader scope - it requests to implement the full TMASD specification including signing of result data streams. This one is only about signature verification, which is a part that is mandatory for the certification. However, the  https://bugzilla.redhat.com/show_bug.cgi?id=1815157 has a nice doc text which will be moved here.

Comment 27 errata-xmlrpc 2021-11-09 18:04:06 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 (openscap bug fix and enhancement update), 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/RHEA-2021:4192

Comment 29 Jan Černý 2022-10-19 06:58:26 UTC
Hi, can you explain how this software is related?


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