News for hackers. Stuff that matters.
Re:I was asked to crack a program in a job interview by SEJeff on Wednesday September 17, 2014 @03:50PM (#8332020)
Afraid you're woefully incorrect. The root user is no more contained inside a default docker image than they are inside a chroot, which is, not really at all. It isn't difficult to break out of a container if you have uid 0 aka root. This will change when the userns stuff lands, but it hasn't yet, so that doesn't count yet.

https://opensource.com/business/14/9/security-for-docker

Or as solomon hykes, the docker creator himself said recently:

https://news.ycombinator.com/item?id=7910117

"""When we feel comfortable saying that Docker out-of-the-box can safely contain untrusted uid0 programs, we will say so clearly."""

Re:I was asked to crack a program in a job interview by general_failure on Wednesday September 17, 2014 @04:27PM (#8332192)
Well, so far I have only heard a lot of FUD and nothing concrete.

http://opensource.com/business/14/7/docker-security-selinux seems to have some information. But to refuse the points there, on my system: a) docker containers do not have a /dev/mem b) /sys/fs is mounted read-only c) /dev/sd* is not visible

And so on. What's the thing with cgroups? Can a container delete the host's cgroups? Can it overwrite it's own cgroup constraints?

Can you or someone tell me if there is something I can try out on my own to understand actual issues? I run my containers unprivileged (which is the default) if it matters.

Again, all I am asking is for some material to educate myself on what actually the flaws are. All I have seen are vague articles claiming it's insecure.

Re:I was asked to crack a program in a job interview by SEJeff on Wednesday September 17, 2014 @05:00PM (#8332334)
http://blog.docker.com/2014/06/docker-container-breakout-pro...

But nothing is stopping you from creating a binary and running it as root that perhaps mounts those filesystems, or sends ioctls / badness to the kernel.

I'm just shooting from the hip here and might be wrong, but I'm almost certain devices aren't namespaced. If you were to mknod a block device with the right major / minor numbers as the host's sda/sdb/etc, what would stop you from mounting the host's root filesystem and making changes?

Granted the "work around" is to drop the privileges of the containers as much as possible, use sVirt (via SELinux), drop as many capabilities as possible, don't run untrusted containers, etc. But this isn't a theoretical security problem, it is a real big attack surface.

Edit:

http://www.projectatomic.io/blog/2014/09/yet-another-reason-...

Re:I was asked to crack a program in a job interview by general_failure on Wednesday September 17, 2014 @06:26PM (#8332710)
afaik, devices are namespaced already.

http://lwn.net/Articles/564854/

Re:I was asked to crack a program in a job interview by justincormack on Wednesday September 17, 2014 @07:00PM (#8332837)
No, I dont think thats upstream.
Re:I was asked to crack a program in a job interview by general_failure on Wednesday September 17, 2014 @11:17PM (#8333500)
For a moment I thought John Cormack replied :)

Thanks for the info.

Re:I was asked to crack a program in a job interview by scintill76 on Wednesday September 17, 2014 @05:43PM (#8332541)
When the creators themselves are saying they don't consider it secure, I don't think it's "FUD".
Re:I was asked to crack a program in a job interview by general_failure on Wednesday September 17, 2014 @06:24PM (#8332703)
Sorry, I didn't imply what Shykes said is FUD. I meant most of the articles out there about docker security have little to no information other than "breakout is possible".
Re:I was asked to crack a program in a job interview by scintill76 on Wednesday September 17, 2014 @09:26PM (#8333184)
That quote from Shykes could be paraphrased "it's safest to assume breakout by uid0 is possible." I understand the academic/hacker interest in identifying the exact avenues for breakout, and why vague articles are disappointing. My point is, it's important everyone understand it's not to be considered secure, even if we can't/don't name the vulnerabilities off the top of our heads.
Re:I was asked to crack a program in a job interview by general_failure on Wednesday September 17, 2014 @11:16PM (#8333496)
Fair enough. I agree with you.
Re:I was asked to crack a program in a job interview by ryan-c on Wednesday September 17, 2014 @04:35PM (#8332230)
You should be assuming Docker is insecure until proven otherwise. Fully isolating a root user with a shared kernel is very difficult.
Re:I was asked to crack a program in a job interview by mappu on Wednesday September 17, 2014 @05:02PM (#8332344)
OpenVZ is very widely deployed and manages to do this safely.
Re:I was asked to crack a program in a job interview by SEJeff on Wednesday September 17, 2014 @05:18PM (#8332416)
Re:I was asked to crack a program in a job interview by icebraining on Wednesday September 17, 2014 @05:42PM (#8332536)
The first is not even an OpenVZ bug, and which of the others shows an exploit that breaks out of the VM?
Re:I was asked to crack a program in a job interview by jchavannes on Thursday September 18, 2014 @12:24AM (#8333673)
How do you prove something is secure?