Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/docker.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,11 @@ exports.runContainer = function (parameters, callback) {
const options = {
Image: image,
ExposedPorts: {},
HostConfig: { PortBindings: {} }
HostConfig: {
CapAdd: ['SYS_PTRACE'],
PortBindings: {},
SecurityOpt: ['seccomp=unconfined']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know much about seccomp, but isn't unconfined a bit drastic? Couldn't we instead tweak the seccomp profile (a.k.a. the seccomp policy JSON file) to enable just the required syscalls and nothing more, as suggested in #232 (comment)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ptrace allows seccomp to be bypassed, so constraining anything doesn't improve security.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ptrace allows seccomp to be bypassed

That used to be true but I don't think it is anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you're right; the hole was patched for each architecture and got testing with torvalds/linux@58d0a86.

Copy link
Contributor Author

@ishitatsuyuki ishitatsuyuki Apr 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To sum up: I don't see any significant security issues with unconfined, and maintaining a policy file is hard.

}
};

for (const port in ports) {
Expand Down