Bug 1464184

Summary: openscap-docker has incorrect shebang in run.sh script which causes runc to panic
Product: Red Hat Enterprise Linux 7 Reporter: Matus Marhefka <mmarhefk>
Component: openscap-containerAssignee: Martin Preisler <mpreisle>
Status: CLOSED ERRATA QA Contact: Matus Marhefka <mmarhefk>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: wcerasop
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1464416 (view as bug list) Environment:
Last Closed: 2017-06-28 15:45:22 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-06-22 15:12:19 UTC
Description of problem:
Running openscap-docker image with default command (run.sh) using 'docker run' causes runc to panic. This is due to incorrect shebang line in run.sh script (missing '!' character). When running image using 'atomic scan' everything works fine.


Version-Release number of selected component (if applicable):
openscap-docker-7.3.5.1-1
atomic-1.17.2-9.git2760e30.el7.x86_64


How reproducible:
always


Steps to Reproduce:
1. # docker pull registry.access.redhat.com/rhel7/openscap
2. # docker run --rm -it registry.access.redhat.com/rhel7/openscap
panic: standard_init_linux.go:178: exec user process caused "exec format error" [recovered]
	panic: standard_init_linux.go:178: exec user process caused "exec format error"

goroutine 1 [running, locked to thread]:
panic(0x6f2bc0, 0xc420117260)
	/usr/lib/golang/src/runtime/panic.go:500 +0x1a1
github.com/urfave/cli.HandleAction.func1(0xc420075748)
	/builddir/build/BUILD/docker-88a48670408f9e1604615b1ac3f75366ce3086f2/runc-f5721697226d42d9efeea37fa3a7eb1d208fa1a2/Godeps/_workspace/src/github.com/urfave/cli/app.go:478 +0x247
panic(0x6f2bc0, 0xc420117260)
	/usr/lib/golang/src/runtime/panic.go:458 +0x243
github.com/opencontainers/runc/libcontainer.(*LinuxFactory).StartInitialization.func1(0xc420075198, 0xc42001e0d0, 0xc420075238)
	/builddir/build/BUILD/docker-88a48670408f9e1604615b1ac3f75366ce3086f2/runc-f5721697226d42d9efeea37fa3a7eb1d208fa1a2/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/factory_linux.go:259 +0x18f
github.com/opencontainers/runc/libcontainer.(*LinuxFactory).StartInitialization(0xc420047590, 0xaab9c0, 0xc420117260)
	/builddir/build/BUILD/docker-88a48670408f9e1604615b1ac3f75366ce3086f2/runc-f5721697226d42d9efeea37fa3a7eb1d208fa1a2/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/factory_linux.go:277 +0x353
main.glob..func8(0xc420078a00, 0x0, 0x0)
	/builddir/build/BUILD/docker-88a48670408f9e1604615b1ac3f75366ce3086f2/runc-f5721697226d42d9efeea37fa3a7eb1d208fa1a2/main_unix.go:26 +0x66
reflect.Value.call(0x6dd940, 0x769848, 0x13, 0x73be69, 0x4, 0xc420075708, 0x1, 0x1, 0x4d1c58, 0x731ca0, ...)
	/usr/lib/golang/src/reflect/value.go:434 +0x5c8
reflect.Value.Call(0x6dd940, 0x769848, 0x13, 0xc420075708, 0x1, 0x1, 0xac1720, 0xc4200756e8, 0x4dad06)
	/usr/lib/golang/src/reflect/value.go:302 +0xa4
github.com/urfave/cli.HandleAction(0x6dd940, 0x769848, 0xc420078a00, 0x0, 0x0)
	/builddir/build/BUILD/docker-88a48670408f9e1604615b1ac3f75366ce3086f2/runc-f5721697226d42d9efeea37fa3a7eb1d208fa1a2/Godeps/_workspace/src/github.com/urfave/cli/app.go:487 +0x1e0
github.com/urfave/cli.Command.Run(0x73c035, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x74d5ee, 0x51, 0x0, ...)
	/builddir/build/BUILD/docker-88a48670408f9e1604615b1ac3f75366ce3086f2/runc-f5721697226d42d9efeea37fa3a7eb1d208fa1a2/Godeps/_workspace/src/github.com/urfave/cli/command.go:191 +0xc3b
github.com/urfave/cli.(*App).Run(0xc420098000, 0xc42000c120, 0x2, 0x2, 0x0, 0x0)
	/builddir/build/BUILD/docker-88a48670408f9e1604615b1ac3f75366ce3086f2/runc-f5721697226d42d9efeea37fa3a7eb1d208fa1a2/Godeps/_workspace/src/github.com/urfave/cli/app.go:240 +0x611
main.main()
	/builddir/build/BUILD/docker-88a48670408f9e1604615b1ac3f75366ce3086f2/runc-f5721697226d42d9efeea37fa3a7eb1d208fa1a2/main.go:137 +0xbd6

Comment 5 errata-xmlrpc 2017-06-28 15:45:22 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:1637