Kernel and Landlock requirements
Why ZViz needs Linux 5.13+, cgroups v2, and (on Ubuntu 24.04+) an AppArmor profile — and what happens without them.
ZViz leans on specific kernel features. This guide lists what it needs and what degrades if a requirement is missing.
The requirements
- Linux kernel ≥ 5.13 — for the Landlock LSM.
- cgroups v2 enabled — for per-container resource limits.
- Zig 0.15.0+ — to build ZViz from source.
Why Landlock needs 5.13
Landlock is an unprivileged Linux Security Module that lets a process sandbox its own filesystem access with a ruleset. It landed in Linux 5.13. ZViz applies a Landlock ruleset as one of its five enforcement layers.
On a kernel older than 5.13, ZViz cannot apply Landlock and falls back to chdir-only filesystem isolation, which is weaker. For untrusted workloads, run on 5.13+ so the Landlock layer is in place.
Ubuntu 24.04+ and unprivileged user namespaces
Ubuntu 24.04 restricts unprivileged user namespaces by default
(apparmor_restrict_unprivileged_userns=1). To keep pivot_root working, install the bundled AppArmor
profile:
sudo install -m 0644 packaging/apparmor/zviz /etc/apparmor.d/zviz
sudo apparmor_parser -r /etc/apparmor.d/zviz
Without it, ZViz again falls back to chdir-only filesystem isolation.
Confirming your host
Check the kernel version and that cgroups v2 is mounted before running untrusted work. If either requirement is unmet, ZViz still runs but with reduced filesystem isolation — which you do not want for a hostile workload.
Related
Frequently Asked Questions
Why Linux 5.13 specifically?
The Landlock LSM, which ZViz uses for unprivileged filesystem access control, landed in Linux 5.13. On older kernels ZViz cannot apply a Landlock ruleset and falls back to weaker chdir-only filesystem isolation.
What if I am on Ubuntu 24.04 or newer?
Ubuntu 24.04+ restricts unprivileged user namespaces by default. Install the bundled AppArmor profile so pivot_root works; otherwise ZViz falls back to chdir-only filesystem isolation.
Related
Running an untrusted OCI image
Pick a strict profile, deny network by default, and constrain the filesystem when the workload is hostile.
GuideBuild from source and run your first container
Compile ZViz with Zig 0.15+, extract an OCI rootfs, and run it under a selective-denial profile.
GuideTuning cgroups v2 limits
Cap memory, PIDs, and CPU per container so a runaway or hostile workload stays contained.