GKE Sandbox: Independent operating system kernel to each container
1–10 of 88 posts
Re: GKE Sandbox: Independent operating system kernel to each container
#2> gVisor intercepts application system calls and acts as the guest kernel, without the need for translation through virtualized hardware. gVisor may be thought of as either a merged guest kernel and VMM, or as seccomp on steroids. This architecture allows it to provide a flexible resource footprint (i.e. one based on threads and memory mappings, not fixed guest physical resources) while also lowering the fixed costs of virtualization. However, this comes at the price of reduced application compatibility and higher per-system call overhead.
From what I understand, basically a user-space program that wraps your container and intercepts all system calls. You can then allow/deny/re-wire them (based on a config). So, you have pretty much complete control over what your apps can do.
This for me, is sort of the key takeway from the blog post too: "because we use gVisor to increase the security of Google's own internal workloads, it continuously benefits from our expertise and experience running containers at scale in a security-first environment". So, Google's using something like this internally too for their own workloads, which should be a pretty good sign this works in real life.
[1] https://gvisor.dev/docs/architecture_guide/
Re: GKE Sandbox: Independent operating system kernel to each container
#3Re: GKE Sandbox: Independent operating system kernel to each container
#4For those more familiar with Kubernetes and gVisor, would this allow me to build a CI/CD service that runs untrusted user code?
So yes
Re: GKE Sandbox: Independent operating system kernel to each container
#5For those more familiar with Kubernetes and gVisor, would this allow me to build a CI/CD service that runs untrusted user code?
What gVisor does is provide a smaller attack surface to a containerized process, when compared with a "traditional" Docker container using standard Docker setup (you can, of course harden Docker containers considerably from base, if you are so inclined).
However it doesn't affect anything outside of that interface so, for example, if your CI/CD process is running on a network that has other insecure services on them, then gVisor alone won't really help you if malicious code is executed inside a container allowing an attacker to start probing the environment from the perspective of that container.
Re: GKE Sandbox: Independent operating system kernel to each container
#6That said, I'm really not a fan of the opening line where it references the old trope of "containers don't contain"
The idea that it's trivial to break out of any Docker style container just doesn't reflect reality.
Have there been vulns that allow for container breakout, sure there have, but every piece of software (including gVisor) has had vulnerabilities in it.
What you can say about gVisor is that it likely presents a smaller attack surface in its default configuration than a runc style Docker container.
However, of course, there's nothing to stop people tightening up on the defaults and still using runc.
As an aside for anyone who thinks container breakouts are trivially easy, you can go to https://contained.af and win yourself some money :)
Re: GKE Sandbox: Independent operating system kernel to each container
#7This is a really interesting add-on to GKE and I'm glad to see vendors starting to offer a variety of container runtimes on their platforms. That said, I'm really not a fan of the opening line where it references the old trope of "containers don't contain" The idea that it's trivial to break out of any Docker style container just doesn't reflect reality. Have there been vulns that allow for container breakout, sure t…
-- not just being contrarian here, actually, the reality is that it might be trivial. and it was demonstratively trivial for a long time (see CVE-2019-5736)
As for contained.af -- its not a good indicator, it mostly indicates that the reward doesnt meet the market price for demonstrating an escape from a set of hardened namespaces (which is going to cost more than an escape from "any docker container").
Re: GKE Sandbox: Independent operating system kernel to each container
#8For anyone who hasn't seen this before. There is a pretty good gVisor Architecture Guide that explains how this works pretty well via a few diagrams [1]. Lots more info on these pages too [2, 3]. > gVisor intercepts application system calls and acts as the guest kernel, without the need for translation through virtualized hardware. gVisor may be thought of as either a merged guest kernel and VMM, or as seccomp on ste…
Re: GKE Sandbox: Independent operating system kernel to each container
#9This is a really interesting add-on to GKE and I'm glad to see vendors starting to offer a variety of container runtimes on their platforms. That said, I'm really not a fan of the opening line where it references the old trope of "containers don't contain" The idea that it's trivial to break out of any Docker style container just doesn't reflect reality. Have there been vulns that allow for container breakout, sure t…
The idea that it's trivial to break out of any Docker style container just doesn't reflect reality. -- not just being contrarian here, actually, the reality is that it might be trivial. and it was demonstratively trivial for a long time (see CVE-2019-5736) As for contained.af -- its not a good indicator, it mostly indicates that the reward doesnt meet the market price for demonstrating an escape from a set of hardene…
Also not specifically a Docker vulnerability, it was a runc issue which also affected other Linux containerization software (e.g. lxc)
But despite all that, that's just an example of what I was talking about, all software has vulns, including runc, including gvisor.
Stating that "containers don't contain" implies that it's not just a specific bug, but that architecturally the process is flawed (at least IMHO), which I would suggest is at the least an over-simplification.
as to contained.af, well if it was indeed "trivial" then surely not a large reward would be required :)
Re: GKE Sandbox: Independent operating system kernel to each container
#10For anyone who hasn't seen this before. There is a pretty good gVisor Architecture Guide that explains how this works pretty well via a few diagrams [1]. Lots more info on these pages too [2, 3]. > gVisor intercepts application system calls and acts as the guest kernel, without the need for translation through virtualized hardware. gVisor may be thought of as either a merged guest kernel and VMM, or as seccomp on ste…
A public example of this is Cloud Run [1, 2]
[1] https://news.ycombinator.com/item?id=19616832 [2] https://cloud.google.com/run/docs/reference/container-contra...