
Do Sandbox Restrictions Actually Work for AI Agents Running in Linux and gVisor?
An in-depth technical analysis examines whether security mechanisms such as Landlock, classic BPF socket filters, and CGROUP_DEVICE programs enforce intended restrictions inside container and VM-based sandboxes used by AI agents. Tests conducted on Linux 6.8 and two gVisor releases (20260817.0 and 20260831.0) revealed that Landlock calls consistently return ENOSYS inside gVisor, rendering the mechanism unavailable. CGROUP_DEVICE programs could be loaded and attached successfully under elevated capabilities, yet they produced no observable effect on device access. Classic BPF filters attached via SO_ATTACH_FILTER were accepted without error even with zero capabilities, but continued to allow UDP datagrams that should have been dropped. The study emphasizes that successful configuration alone does not guarantee enforcement and outlines a verification workflow that must be repeated for each target environment, runtime, and policy change before deploying restricted AI tools.
HabrOct 2, 2026Translated from Russian