Bug 1805467 - TypeError handling PEheader during File Collection results in discarding data for *all* files.
Summary: TypeError handling PEheader during File Collection results in discarding data...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: SmartState Analysis
Version: unspecified
Hardware: All
OS: Unspecified
high
high
Target Milestone: GA
: 5.11.5
Assignee: Jerry Keselman
QA Contact: Niyaz Akhtar Ansari
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On: 1824259
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-20 20:31 UTC by Jerry Keselman
Modified: 2020-07-14 07:01 UTC (History)
5 users (show)

Fixed In Version: 5.11.5.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-05 13:43:11 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:
pm-rhel: cfme-5.11.z+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:2020 0 None None None 2020-05-05 13:43:21 UTC

Description Jerry Keselman 2020-02-20 20:31:52 UTC
Description of problem:

If a TypeError is encountered while reading the importList from the file's PEheader, the exception is currently not handled, and consequently the data collected from *all* files is discarded and no file information is available.

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


How reproducible:

This occurs only for Windows virtual machines.  If the file to be collected contains imports, on rare occasion while computing the end of the name in the PEheader.getImports method invalid data is encountered in the file resulting in a TypeError.  This is difficult to reproduce on demand.  An example of the relevant stack trace is:

/usr/local/rvm/gems/ruby-2.6.3/gems/manageiq-smartstate-0.5.0/lib/metadata/util/win32/peheader.rb:152:in `+'
/usr/local/rvm/gems/ruby-2.6.3/gems/manageiq-smartstate-0.5.0/lib/metadata/util/win32/peheader.rb:152:in `block in getImports'
/usr/local/rvm/gems/ruby-2.6.3/gems/manageiq-smartstate-0.5.0/lib/metadata/util/win32/peheader.rb:140:in `loop'
/usr/local/rvm/gems/ruby-2.6.3/gems/manageiq-smartstate-0.5.0/lib/metadata/util/win32/peheader.rb:140:in `getImports'
/usr/local/rvm/gems/ruby-2.6.3/gems/manageiq-smartstate-0.5.0/lib/metadata/util/win32/peheader.rb:94:in `imports'
/usr/local/rvm/gems/ruby-2.6.3/gems/manageiq-smartstate-0.5.0/lib/metadata/util/md5deep.rb:166:in `processFile'
/usr/local/rvm/gems/ruby-2.6.3/gems/manageiq-smartstate-0.5.0/lib/metadata/util/md5deep.rb:81:in `block in scan_glob

Steps to Reproduce:
1. Run SmartState Analysis on a Windows VM containing the invalid files as described above.
2. Set up a collection profile that requests file data from the relevant file.
3.

Actual results:

No data is collected from any files on the virtual Machine.


Expected results:

Data is collected from all requested files.


Additional info:

Comment 3 Jerry Keselman 2020-02-26 15:34:40 UTC
Fixed by https://github.com/ManageIQ/manageiq-smartstate/pull/111 - still waiting final merge.

Comment 4 Jerry Keselman 2020-02-26 16:54:31 UTC
Merged.  Moving to POST.

Comment 6 Satoe Imaishi 2020-04-03 13:34:50 UTC
https://github.com/ManageIQ/manageiq/pull/20025

Comment 10 errata-xmlrpc 2020-05-05 13:43:11 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-2020:2020


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