by tptacek · 5y ago · 0 comments
https://fly.io/blog/sandboxing-and-workload-isolation/
Two useful links from my Pinboard research for that post:
A person at Red Hat optimizing QEMU boot time:
http://oirase.annexia.org/tmp/paper.pdf
An Intel deck talking about qemu-lite:
http://events17.linuxfoundation.org/sites/events/files/slide...
(The other thing to follow up on if you're interested in the background on this stuff is kvmtool).
In both cases, a big part of the answer seems to be eliminating BIOS overhead; getting rid of oproms appears to have been the single biggest win for Intel. But the Red Hat article also finds lots of overhead in QEMU itself, and both pieces talk about kernel config issues (for instance, scrubbing the kernel you boot of subsystems that have expensive initcalls).
By comparison: Firecracker is purpose-built in Rust for this one task, provides no BIOS, and offers only network, block, keyboard, and serial device support --- with tiny drivers (the serial support is less than 300 lines of code).
>"People like to say “Docker isn’t a security boundary”, but that’s not so true anymore, though it once was."
Could you explain why that wasn't true and why it is now?
>"Systems security people spent almost a decade dunking on Docker because of all the gaps in this simplified container model. But nobody really runs containers like this anymore."
Could you elaborate? People don't run container like what? It isn't clear from the preceding paragraph.
Another commentator on this thread points out that GKE uses trimmed-down Chromium OS? https://news.ycombinator.com/item?id=25884851
Edit: I guess container-optimized Chromium OS and gVisor are complementary (that is, you're welcome to run your app in gVisor sandboxed containers on a guest VM running Google's container-optimized OS). Ref: https://go-review.googlesource.com/c/playground/+/195983
It's a matter of having a smaller attack surface. There are plenty of container images that run with root access by default, which is almost full access to the kernel. This means that if the application running in the container is compromised, you need to rely on the kernel enforcing the sandbox between containers. This is a relatively new threat (root not being fully trusted), so beyond there simply being more attack surface, there's likely to be more bugs/vulns out there to be discovered. With effort and care you can safely run this but reducing attack surface is a good idea for defense in depth.
"libkrun is a dynamic library that allows programs to easily acquire the ability to run processes in a partially isolated environment using KVM Virtualization."