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 1474471 - openscap crashes when scanning system with invalid hostname
Summary: openscap crashes when scanning system with invalid hostname
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: openscap
Version: 7.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Jan Černý
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-24 17:33 UTC by Matus Marhefka
Modified: 2019-03-12 14:31 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-12 14:31:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Matus Marhefka 2017-07-24 17:33:20 UTC
Description of problem:
When scanning system with invalid host name, openscap crashes.


Version-Release number of selected component (if applicable):
openscap-1.2.14-2.el7


How reproducible:
always


Steps to Reproduce:
# sysctl kernel.hostname=test_test
# cd tests/API/XCCDF/applicability
# make check
# grep -i "openscap error" -A15 test_api_xccdf_applicability.log
OpenSCAP Error: File '/tmp/test_remediate_fix_processing_ds.arf.52XmYH' line 0: Element '{http://scap.nist.gov/schema/asset-identification/1.1}hostname': [facet 'pattern'] The value 'test_test' is not accepted by the pattern '[\w\-]+(\.[\w\-]+){0,}'.
 [xccdf_session.c:587]
File '/tmp/test_remediate_fix_processing_ds.arf.52XmYH' line 0: Element '{http://scap.nist.gov/schema/asset-identification/1.1}hostname': 'test_test' is not a valid value of the atomic type '{http://scap.nist.gov/schema/asset-identification/1.1}hostname-type'.
 [xccdf_session.c:587]
Invalid ARF Result Datastream (1.1) content in /tmp/test_remediate_fix_processing_ds.arf.52XmYH. [oscap_source.c:342]
D: lt-probe_system_info: Received signal 15 from 30428 (parent) [lt-probe_system_info(30466):signal_handler(7fc12d3e1700):signal_handler.c:100:probe_signal_handler]
D: lt-probe_file: Received signal 15 from 30428 (parent) [lt-probe_file(30486):signal_handler(7ff224917700):signal_handler.c:100:probe_signal_handler]
./test_remediate_fix_processing_ds.sh: line 23: 30428 Segmentation fault      $OSCAP xccdf eval --verbose DEVEL --remediate --results $resultx --results-arf $arf $sds

Note: I removed redirection of stderr to a separate file in test_remediate_fix_processing_ds.sh file.

Comment 1 Matus Marhefka 2017-07-25 12:48:30 UTC
List of tests which are segfaulting due to this bug:

tests/API/XCCDF/applicability/test_remediate_fix_processing_ds.sh
tests/API/XCCDF/unittests/test_xccdf_results_arf_no_oval.sh
tests/API/XCCDF/unittests/test_fix_script_header.sh
tests/API/XCCDF/unittests/test_fix_arf.sh
tests/bz2/test_bz2_datastream.sh
tests/DS/test_ds.sh

Comment 2 Marek Haicman 2019-03-12 14:31:32 UTC
This issue was not selected to be included in Red Hat Enterprise Linux 7.7 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 will now close this issue, but if you believe that it qualifies for the Maintenance Support 1 Phase, please re-open; otherwise, we recommend moving the request to Red Hat Enterprise Linux 8 if applicable.


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