Bug 1431186

Summary: systemd probes are crashing during scanning Docker container
Product: Red Hat Enterprise Linux 7 Reporter: Matus Marhefka <mmarhefk>
Component: openscapAssignee: Jan Černý <jcerny>
Status: CLOSED ERRATA QA Contact: Matus Marhefka <mmarhefk>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: mhaicman, mpreisle, openscap-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 08:45:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Matus Marhefka 2017-03-10 14:42:07 UTC
Description of problem:
Openscap systemd probes are crashing during scanning Docker containers. This probably happens because containers do not have systemd running inside them by default.


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


How reproducible:
always


Steps to Reproduce:
1. docker run --rm -it rhel7 bash
2. yum install -y openscap scap-security-guide
   - you will need to add a repository to the container as by default there are none
3. oscap xccdf eval --remediate --profile xccdf_org.ssgproject.content_profile_pci-dss /usr/share/xml/scap/ssg/content/ssg-rhel7-ds.xml


Actual results:
OpenSCAP Error: Probe at sd=8 (systemdunitdependency) reported an error: Unknown error [oval_probe_ext.c:393]
Unable to receive a message from probe [oval_probe_ext.c:579]
Invalid oval result type: -1. [oval_resultTest.c:179]
Probe at sd=8 (systemdunitdependency) reported an error: Unknown error [oval_probe_ext.c:393]
Unable to receive a message from probe [oval_probe_ext.c:579]
Invalid oval result type: -1. [oval_resultTest.c:179]
Probe at sd=8 (systemdunitdependency) reported an error: Unknown error [oval_probe_ext.c:393]
Unable to receive a message from probe [oval_probe_ext.c:579]
Invalid oval result type: -1. [oval_resultTest.c:179]
Probe at sd=8 (systemdunitdependency) reported an error: Unknown error [oval_probe_ext.c:393]
Unable to receive a message from probe [oval_probe_ext.c:579]
Invalid oval result type: -1. [oval_resultTest.c:179]


Expected results:
Scan finishes without errors.

Comment 2 Matus Marhefka 2017-03-10 14:54:10 UTC
Bug occurs for scap-security-guide-0.1.30-3.el7.noarch but also for the newest SSG built from github repo.

Comment 3 Jan Černý 2017-03-21 07:11:27 UTC
A fix was merged upstream https://github.com/OpenSCAP/openscap/pull/708

Comment 6 Matus Marhefka 2017-04-27 10:12:59 UTC
VERIFIED as fixed for openscap-1.2.14-1.el7.x86_64


OLD - openscap-1.2.10-2.el7.x86_64:

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Scanning rhel7 container -- storing output in /tmp/tmp.hHmMlL1cTM (Expected 0-255, got 2)
...
Title   Set SSH Idle Timeout Interval
Rule    xccdf_org.ssgproject.content_rule_sshd_set_idle_timeout
Ident   CCE-27433-2
Result  pass
...
OpenSCAP Error: Probe at sd=8 (systemdunitdependency) reported an error: Unknown error [oval_probe_ext.c:393]
...
:: [   FAIL   ] :: File '/tmp/tmp.hHmMlL1cTM' should not contain 'error'



NEW - openscap-1.2.14-1.el7.x86_64:

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Scanning rhel7 container -- storing output in /tmp/tmp.I9aOsb2b1y (Expected 0-255, got 2)
:: [   PASS   ] :: File '/tmp/tmp.I9aOsb2b1y' should not contain 'error'

Comment 7 errata-xmlrpc 2017-08-01 08:45:48 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-2017:2291