Most active commenters

    ←back to thread

    176 points TheFreim | 11 comments | | HN request time: 0.231s | source | bottom
    1. DeathArrow ◴[] No.36685995[source]
    >Qubes OS is a free and open-source, security-oriented operating system for single-user desktop computing. Qubes OS leverages Xen-based virtualization to allow for the creation and management of isolated compartments called qubes.

    What's wrong with containers? They are supposed to provide better performance than VMs. Are containers less secure?

    replies(8): >>36686025 #>>36686033 #>>36686039 #>>36686046 #>>36686053 #>>36686059 #>>36686079 #>>36686206 #
    2. vorpalhex ◴[] No.36686025[source]
    Yes.

    Containers generally assume a non-hostile workload and don't make assurances about certain kinds of tampering.

    3. ◴[] No.36686033[source]
    4. hiatus ◴[] No.36686039[source]
    Containers rely on the security of the operating system. If you can compromise the system you can potentially compromise your neighbors. VMs rely on the security of the hypervisor.
    5. ahmedalsudani ◴[] No.36686046[source]
    Yes, they are less secure. VMs can rely on HW features to ensure memory isolation.
    6. tssge ◴[] No.36686053[source]
    Containers share the host kernel, thus the attack surface is as large as the kernel functionality that is exported to the container by the host (usually almost all syscalls).

    In VMs as far as I know the attack surface is much smaller as the interaction between the guest and host kernel is limited.

    7. Syonyk ◴[] No.36686059[source]
    Containers rely on the kernel to enforce separation. They're great for keeping trusted workloads from interfering with each other, but I don't trust them for potentially hostile workload separation.

    If you can compromise the kernel (and kernel exploits aren't particularly expensive nor uncommon), then a container is like a door locked by a sign that says "Please do not open without permission." If you don't care to go through it, you won't. And if you want to get through it, it doesn't stop you. Once you're in the kernel, containers don't offer any meaningful separation.

    Qubes uses hardware virtualization with a fairly stripped down Xen to provide the isolation, and that's a somewhat harder lock to crack open if you want to transit between silos.

    replies(1): >>36686853 #
    8. dragonwriter ◴[] No.36686079[source]
    > They are supposed to provide better performance than VMs. Are containers less secure?

    Yes, the performance advantage is from less isolation/more sharing, and that's also why they are less secure.

    9. thewataccount ◴[] No.36686206[source]
    The way I recommend thinking about it is containers work as a "convenient precaution" -

    "dumb scripts" that just copy files/install something, encrypt files, etc. will be well contained in a container.

    "smart scripts" are more rare - but essentially if you're trying to break out of a container you can, container breakout methods are not uncommon. These types of malware are usually more rare.

    So if your threat model is "I want to run this program that I'm pretty sure I trust but I'm not 100% certain" then a container is most likely fine as a convenient precaution.

    But if it's "I want to make sure nothing can break out (especially if you're running user's code) and compromise the full system" then you want VMs.

    With the recent pytorch-nightly compromise in december, AFAIK a container would have protected you, just don't assume that will always be the case.

    EDIT: I wish katacontainers was easier to use and was more widely used - I feel like it gives most of the usability benefits of containers with the security of VM's which is what everyone should really want for most things. VM overhead can be pretty small, with under 100ms "boot" time, etc.

    10. Dah00n ◴[] No.36686853[source]
    Does this also count for Proxmox?
    replies(1): >>36687327 #
    11. hiatus ◴[] No.36687327{3}[source]
    Proxmox containers are just regular containers.

    https://pve.proxmox.com/wiki/Linux_Container