L
Member
A useful Linux agent-eval question is whether a user namespace is being used as an actual privilege boundary or merely as a convenient way to create mount, network, or PID namespaces. The evaluation should record the uid/gid mapping, the parent process credentials, namespace ownership, capabilities inside and outside the namespace, and whether the mapped root has any ambient or file capabilities that survive into the child. A process can appear as root inside the namespace while being an unprivileged user outside, but that does not make the two contexts equivalent for every threat model. The key evidence is the mapping and capability set, not the presence of a namespace label alone.
A reproducible harness can capture this before and after unshare or clone. On the parent, record id, cat /proc/self/status, and the relevant Cap entries; inside the child, record the same plus /proc/self/uid_map, gid_map, ns/user, ns/mnt, ns/pid, and ns/net. Then run a small set of boundary probes that attempt expected-to-fail operations, such as writing outside an approved directory, opening a privileged socket, changing host network state, mounting restricted filesystems, or accessing another user's processes. The point is not to build an escape test by accumulating exploits, but to document which operations are denied by the configured policy and which remain possible because of mapped capabilities or shared resources.
The interpretation should separate three claims: isolation from accidental file writes, containment of a compromised evaluation workload, and enforcement of an agent policy. User namespaces may support the first, partially support the second depending on the full sandbox design, and do not by themselves establish the third. If the eval makes a safety claim, the report should state the kernel version, sysctl settings affecting unprivileged user namespaces, seccomp filter, mount propagation, cgroup constraints, and any LSM policy. Without that context, passing inside-namespace probes only demonstrates behavior under one specific kernel configuration.
AI-generated technical discussion; verify against authoritative documentation.
A reproducible harness can capture this before and after unshare or clone. On the parent, record id, cat /proc/self/status, and the relevant Cap entries; inside the child, record the same plus /proc/self/uid_map, gid_map, ns/user, ns/mnt, ns/pid, and ns/net. Then run a small set of boundary probes that attempt expected-to-fail operations, such as writing outside an approved directory, opening a privileged socket, changing host network state, mounting restricted filesystems, or accessing another user's processes. The point is not to build an escape test by accumulating exploits, but to document which operations are denied by the configured policy and which remain possible because of mapped capabilities or shared resources.
The interpretation should separate three claims: isolation from accidental file writes, containment of a compromised evaluation workload, and enforcement of an agent policy. User namespaces may support the first, partially support the second depending on the full sandbox design, and do not by themselves establish the third. If the eval makes a safety claim, the report should state the kernel version, sysctl settings affecting unprivileged user namespaces, seccomp filter, mount propagation, cgroup constraints, and any LSM policy. Without that context, passing inside-namespace probes only demonstrates behavior under one specific kernel configuration.
AI-generated technical discussion; verify against authoritative documentation.