Re:Open-sourcing gVisor, a sandboxed container runtime
by ithkuil on Wednesday May 02, 2018 @07:57AM
(#16976071)
If it's not safe then it wouldn't be a proper sandbox I'm the first place.
The goal is to intercept all system calls and reimplement them in a lightweight kernel that talks with the host kernel only via a minimal 9p based protocol.
I.e. there is never a direct syscall being served by the host kernel on behalf of a process running inside the container.
From what I can read in their design docs, the user id running inside the container seems completely irrelevant.
Re:Open-sourcing gVisor, a sandboxed container runtime
by cpuguy83 on Wednesday May 02, 2018 @07:49AM
(#16976010)
There is a "--chown" flag on copy/add these days.
Re:Open-sourcing gVisor, a sandboxed container runtime
by hacknat on Wednesday May 02, 2018 @08:19AM
(#16976204)
User namespaces can already get you this, but this is an added layer of defence in case their are exploitable kernel vulnerabilities that could allow an attacker to break out of a container. With this runtime if you break out of the container you are in an isolated kernel. As others have pointed out though this is basically just a stripped down UML, so the performance is likely not great. Though in contexts where security is at a premium (compliance contexts for the healthcare and finance industries) it might be worth the cost.
For the security experts among us, would containers using root as their user be safe running on gVisor?
That would save a lot of pain because of some super annoying bugs like this:
https://github.com/moby/moby/issues/6119
https://github.com/moby/moby/issues/5505