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 1642283 - NULL pointer dereference in cvrf_priv.c:cvrf_model_filter_by_cpe() with `oscap cvrf eval`
Summary: NULL pointer dereference in cvrf_priv.c:cvrf_model_filter_by_cpe() with `osca...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: openscap
Version: 7.5
Hardware: x86_64
OS: All
low
low
Target Milestone: rc
: ---
Assignee: Jan Černý
QA Contact: Matus Marhefka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-10-24 06:33 UTC by Sam Fowler
Modified: 2020-11-14 04:26 UTC (History)
5 users (show)

Fixed In Version: openscap-1.2.17-10.el7
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-29 19:53:30 UTC
Target Upstream Version:
Embargoed:
lcervako: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:3914 0 None None None 2020-09-29 19:53:43 UTC

Description Sam Fowler 2018-10-24 06:33:12 UTC
Description of problem:
Found by testing with cvrf.xml on portal, e.g.
https://access.redhat.com/labs/securitydataapi/cvrf.xml

But seems to be the same result with an empty xml file too.


Version-Release number of selected component (if applicable):
openscap-scanner-1.2.16-8.el7_5.x86_64

How reproducible:
Every time.

Steps to Reproduce:
1. $ yum install -y openscap-scanner
2. $ touch foo.xml
3. $ oscap cvrf eval foo.xml

Actual results:
Segmentation Fault

Expected results:
No segfault

Additional info:
Backtrace:

#0  0x00007ffff4b486e9 in cvrf_model_filter_by_cpe (model=0x0, 
    cpe=0x600c0000bde0 "Red Hat Enterprise Linux Desktop Supplementary (v. 6)")
    at cvrf_priv.c:1293
#1  0x00007ffff4b4d35e in find_all_cvrf_product_ids_from_cpe (
    session=session@entry=0x60080000a4d0) at cvrf_eval.c:172
#2  0x00007ffff4b4debe in cvrf_model_get_results_source (import_source=<optimized out>, 
    os_name=os_name@entry=0x555555584660 "Red Hat Enterprise Linux Desktop Supplementary (v. 6)") at cvrf_eval.c:230
#3  0x0000555555574c58 in app_cvrf_evaluate (action=0x7fffffffe2c0) at oscap-cvrf.c:102
#4  0x0000555555566e16 in oscap_module_call (action=0x7fffffffe2c0) at oscap-tool.c:261
#5  oscap_module_process (module=0x55555578ffc0 <CVRF_EVALUATE_MODULE>, 
    module@entry=0x55555578a120 <OSCAP_ROOT_MODULE>, argc=argc@entry=4, 
    argv=argv@entry=0x7fffffffe5b8) at oscap-tool.c:346
#6  0x0000555555564c32 in main (argc=4, argv=0x7fffffffe5b8) at oscap.c:83

Comment 2 Jan Černý 2018-10-24 07:28:02 UTC
It is important to say that CVRF module in OpenSCAP doesn't work at all.

I can reproduce the segmentation fault. I could do a quick patch for the segfault, but result would be it will print out some error message instead.

I also noticed that the CVRF document you linked has root element "Cvrfs", but according to CVRF v1.1 XML schema it should be "cvrfdoc". Is that document following a different standard?

Do you have an intention to use CVRF? Is there any possible use-case for it?

Comment 3 Sam Fowler 2018-10-24 07:40:31 UTC
(In reply to Jan Černý from comment #2)
> It is important to say that CVRF module in OpenSCAP doesn't work at all.
> 
> I can reproduce the segmentation fault. I could do a quick patch for the
> segfault, but result would be it will print out some error message instead.

I suspected the CVRF module was not supported, but it was not clear to me. I would definitely prefer a meaningful error message to a segfault.

> I also noticed that the CVRF document you linked has root element "Cvrfs",
> but according to CVRF v1.1 XML schema it should be "cvrfdoc". Is that
> document following a different standard?

I'm not familiar enough with the standards to say.

> Do you have an intention to use CVRF? Is there any possible use-case for it?

I don't have any specific use-case for CVRF. I was just exploring different uses of Red Hat's security data with oscap when I stumbled across the crash.

Comment 4 Jan Černý 2018-11-13 13:35:48 UTC
The segmentation fault has been fixed in upstream in https://github.com/OpenSCAP/openscap/pull/1252

Comment 10 errata-xmlrpc 2020-09-29 19:53:30 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/RHBA-2020:3914


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