this post was submitted on 23 Mar 2026
5 points (77.8% liked)

Linux

16754 readers
106 users here now

Welcome to c/linux!

Welcome to our thriving Linux community! Whether you're a seasoned Linux enthusiast or just starting your journey, we're excited to have you here. Explore, learn, and collaborate with like-minded individuals who share a passion for open-source software and the endless possibilities it offers. Together, let's dive into the world of Linux and embrace the power of freedom, customization, and innovation. Enjoy your stay and feel free to join the vibrant discussions that await you!

Rules:

  1. Stay on topic: Posts and discussions should be related to Linux, open source software, and related technologies.

  2. Be respectful: Treat fellow community members with respect and courtesy.

  3. Quality over quantity: Share informative and thought-provoking content.

  4. No spam or self-promotion: Avoid excessive self-promotion or spamming.

  5. No NSFW adult content

  6. Follow general lemmy guidelines.

founded 2 years ago
MODERATORS
 

The container runs a local host server for use in a browser and is untrusted for development reasons. It needs to be treated as an advanced black hat. Its primary goal is recon and sending critical information via advanced connectionless protocols of unknown type. While extremely unlikely, it should be assumed to have access to proprietary systems and keys such as Intel ME and a UEFI shim of some sort. It may also use an otherwise trusted connection such as common git host, CDN, or DNS to communicate. It tries to access everything possible, key logger, desktop GUI, kernel logs, everything.

What is the Occam's Razor of solutions that best fit the constraints in your opinion? Other than the current solution of air gap.

you are viewing a single comment's thread
view the rest of the comments
[–] Neptr@lemmy.blahaj.zone 7 points 7 hours ago* (last edited 1 hour ago) (2 children)

Distrobox is design to be the opposite of confined. Its goal is integration. The container is stripped away as much as possible to allow for sharing host resources.

As it says on the Distrobox website:

Security implications

Isolation and sandboxing are not the main aims of the project, on the contrary it aims to tightly integrate the container with the host. The container will have complete access to your home, pen drive, and so on, so do not expect it to be highly sandboxed like a plain docker/podman container or a Flatpak.

I would also argue calling "plain docker/podman container or a Flatpak" being "highly sandboxed" is also quite wrong and a misuse of those technology.

It uses Docker/Podman which is not a security sandbox. The purpose is app containers, not a security boundary. It shares the sane kernel as the host, which makes kernel vulnerabilities a source of container escapes. Docker (the default) runs as root and could be a source of privilege escalation. Best case is use gVisor or SELinux. Still not a secure sandbox.

Similar problems with Flatpak. Not a secure sandbox. ~~Doesn't~~ Barely filters syscalls (and in a general way instead of per-app), barely reduces attack surface, granting frequently required permissions often significantly reduces the strength of the sandbox, shares a kernel with the host (and no application kernel like gVisor or sydbox), weak use MAC (like SELinux). Most of this can also be said of the previous 2 container software (and also LXC/LXD/Incus).

Also, don't use browsers with Flatpak, they have a significantly weaker sandbox because it is missing a layer of sandboxing (namespaces). This makes attack exponential more likely by reducing the need chain another major vulnerability to execute a successful sandbox break.

What you want is a VM. It is designed to be a secure sandbox but needs some configuring.

[–] moonpiedumplings@programming.dev 1 points 4 hours ago (1 children)

Flatpak sandboxing uses bubblewrap, which uses seccomp and can filter syscalls.

LXD/Incus can run qemu-kvm virtual machines in addition to containers. In fact, I like the security posture of LXD/Incus better here because they use cgroups, namespaces, seccomp, to sandbox the qemu process, which libvirt also does but proxmox does not.

[–] Neptr@lemmy.blahaj.zone 1 points 3 hours ago (1 children)

Yes, I understand Flatpak does some seccomp syscall filtering. It still isn't enough to consider a secure sandbox where the threat model is that the app is untrusted. Bubblewrap is generally considered a weak sandbox and isn't "secure by default", allowing for easy footguns.

LXC/Incus does support proper VMs but it isnt as common.

Neither are really designed to run untrusted apps.

[–] wildbus8979@sh.itjust.works 1 points 2 hours ago* (last edited 2 hours ago) (1 children)

~~LXC is namespaces only, maybe you're thinking of libvirt~~ I stand corrected about LXD, never knew it did that, weird I don't know why you'd wanna do that instead of using libvirt.

Flatpack uses namespaces. And unless you have it disabled in the kernel, namespaces can be nested. There's nothing stopping a browser running a flatpack from using namespaces itself.

Not to say that you are incorrect about namespaces vs security. Namespaces are not as secure as a VM.

[–] Neptr@lemmy.blahaj.zone 1 points 1 hour ago* (last edited 1 hour ago)

Flatpakbapps cant use namespaces. Flatpak (the software) uses namespaces but Flatpak apps can not.

[–] j4k3@lemmy.world 1 points 7 hours ago* (last edited 7 hours ago) (1 children)

Thanks for your reply. The point here is not about the merits of distrobox for security. This is a constraint that is not easily changed. It is only an element present, not an implementation of sandboxing.

I am looking for the best method that is hopefully less complicated than a systemwide SELinux policy plus Pam and Groups.

If anything, the distrobox is an added issue due to the nobody user.

[–] Neptr@lemmy.blahaj.zone 2 points 7 hours ago* (last edited 6 hours ago)

I guess I just don't understand your question. Explain in more detail.

  1. Who is the threat actor? (State, APT, Hackivist, etc)
  2. What is their goal (what do they want)? (Money, data, persistent access, blackmail)
  3. What tools do they have?

Really think about the Ws (who, what, where, when, how).

If you want to protect against an "advanced" threat actor, you can not do that without multiple layers of isolation, including but not limited to virtualization, MAC (SELinux), namespaces, seccomp.

All protections are meaningless without a clear understanding of what assets you are protecting, the threat you face, and they want from you.