5 ms·
Everybody hypnotized themselves into believing that containers are not secure and can never be made secure so they run one container per VM. Instead of investin
by wmf 4y ago
Everybody hypnotized themselves into believing that containers are not secure and can never be made secure so they run one container per VM. Instead of investing in making containers secure, the industry decided to invest in making VMs ligher, so VMs are now efficient enough that you can run one container per VM.
Why run Docker in VMs instead of using VM images? Because Docker's build tools are more popular than Packer-style tooling.
- viraptor 4y ago> hypnotized themselves into believing that containers are not secure They provide any extra layer of indirection which helps with usual exploit attempts, but also introduce new scope. We've had exploits specifically targeting the namespaces API already.
- solarkraft 4y ago> We've had exploits specifically targeting the namespaces API already Well, isn't that what happens when you put a shield into place? Someone tries to break it. Why have people concluded that it can never be made properly secure?
- tptacek 4y agoBecause the broad kernel attack surface is huge, and the shield has to reliably protect all of it, or all you've done is create a jungle gym for vulnerability researchers. The win with virtualization is that it drastically scopes down the amount of kernel code exposed to untrusted code.
- tptacek 4y agoI don't know if hypnosis works or not, but quitting smoking is good whether or not you hypnotize yourself to do it, and so is avoiding multi-tenant Docker. The broad kernel attack surface is much too scary to expose directly to multi-tenant workloads, and there have been fairly recent kernel LPEs that would have avoided any sane system call filter you could come up with. It's a moot point, because this is a solved problem. Use containers for single-tenant workloads; use micro-VMs, whichever flavor you like best, for multi-tenant.
- zachthewf 4y agoWhat is the status of hardware acceleration for micro-VMs? I know that Firecracker doesn't have GPU support yet, are there any other options that handle this?
- tptacek 4y agoIt's a good question. GPUs are in some ways a difficult case for the Firecracker model, which prizes a minimal, mostly memory-safe attack surface that (critically) is easy to reason about. We'd very much like to get an instance or machine type that supports GPUs, but we perceive it as a Big Project. We might not even use Firecracker to do it when we finally get it rolling. If you're reading this and have big thoughts on how we might do GPUs at Fly.io without keeping us up at night about security, you should reach out; we're hiring.
- foobiekr 4y agoThe issue with container security is that the linux kernel boundary is porous and probably not possible to secure in depth.
- freedomben 4y agoI don't necessarily disagree with "the linux kernel boundary is porous and probably not possible to secure in depth", but IIUC the hypervisor is part of the kernel too, so wouldn't it have the same problem? The win would be in the attack surface area. For hypervisors there's a good layer of abstraction to pivot over, whereas with containers it's a much thinner wall.
- tptacek 4y agoKVM is a much smaller chunk of the kernel than the entire system call interface, along with every exposed device and its suite of ioctls.
- foobiekr 4y agoKVM presents a very narrow, well understood surface that is much much less of a moving target and changes at a much slower rate. Qemu has traditionally been a problem which is why Amazon and google have moved away from it. The container kernel surface is just insane by comparison.
- zokier 4y agoNot everybody. Google notably uses gvisor instead of vms
- ithkuil 4y agoWhich is an alternative approach to providing a dedicated kernel to the VM/container. (Because that's what basically a hypervisor does). Gvisor effectively implements a Linux kernel in user space, written in a memory safe language. A kernel that insulates all system calls from the host kernel, by literally implementing wrappers around host system calls.
- yencabulator 4y agoAs far as I can read between the lines, Google has a non-open-source backend for gVisor, and it really wouldn't surprise me if that was KVM too.
- tremon 4y agoEverybody hypnotized themselves into believing that daemons are not secure and can never be made secure so they run one daemon per container. Instead of investing in making daemons secure, the industry decided to invest in making daemons heavier, so each daemon can now be provided with its own hardware/OS abstraction layer. Why run daemons in containers instead of using proper process isolation? Because containers absolve the system administrator from understanding their systems.