News for hackers. Stuff that matters.
Re:A whirlwind tour of systemd-nspawn containers by tredre3 on Friday October 23, 2026 @09:57PM (#50217706)
Nspawn has a lot of issues with bind mounts in general. They've never been fixed because pottery doesn't see the point. See for example: https://github.com/systemd/systemd/issues/26897
Re:A whirlwind tour of systemd-nspawn containers by PeterWhittaker on Saturday October 24, 2026 @06:49AM (#50220030)
Your comment intrigued me so I read the issue, but I don't follow how his comments re a potential security concern and being able to overmount from inside the container lead to a conclusion of not seeing the point.

As a cybersecurity guy, my interpretation is that the requested change could introduce a vulnerability and that there is another potential path to achieve the same result, which should likely be explored first.

Any change that can compromise security needs significant justification, and should come with guards to allow it to be used in those cases where no other alternatives exist, without impacting other cases.

I've mostly used podman and am far from expert, and have long been intrigued by nspawn, so I really would like to understand the rationale.

Any other examples of nspawn mount limitations impacting operations without "workarounds"? Thanks!

Re:A whirlwind tour of systemd-nspawn containers by notme43 on Saturday October 24, 2026 @01:24PM (#50223269)
Passing /dev/dri/renderD128 or /dev/kfd to nspawn doesn't provide separation from the host like podman does. It's possible to run GPU workloads with nspawn, but this behavior makes it a bit trickier than simply passing --gpu or --device to podman.
Re:A whirlwind tour of systemd-nspawn containers by PeterWhittaker on Saturday October 24, 2026 @02:15PM (#50223716)
From what I can tell, those options make the GPU available to podman, but without any form of host isolation/separation: the GPU is fully available without restrictions.

Since none of the existing namespaces treat GPUs directly (though perhaps this could be accomplished with cgroup?), this lack of isolation doesn’t surprise me.

While this may be useful for some workloads, the apparent lack of separation gives me pause from a security PoV.

One would hope that podman containers accessing GPUs are otherwise properly constrained to prevent their workloads from using GPU access to gain undesirable access to other hosts resources.

So I am left with my original question: what equivalency to podman, other than invocation convenience, is missing from nspawn? If none, it seems to me that having an awkward invocation in nspawn helps alert the user to the risks hidden by podman's convenience.