Skip to content

v0.1.9 Kubernetes driver: delegated spawn of image entrypoint fails with Permission denied (os error 13) in a user-namespaced workload Pod; no Landlock or SELinux denial recorded #5885

Closed

Description

@ewhauser

Summary

After upgrading the Kubernetes driver from v0.1.6 to v0.1.9, no sandbox starts its entrypoint. The supervisor attaches and confirms the isolation boundary, and the boundary runtime builds its Landlock ruleset. Then spawning the entrypoint fails right away with a raw EACCES. Because v0.1.9 doesn't recover a lost boundary, the workload is frozen and terminated after the recovery deadline.

The same image and sandbox policy worked on v0.1.6.

Environment

  • OpenShell gateway and Kubernetes driver v0.1.9, using the split supervisor/workload Pods.
  • enable_user_namespaces = true, so the workload Pod runs with hostUsers: false. The container runtime uses idmapped overlay rootfs mounts.
  • Workload container: runAsUser/runAsGroup 1000, allowPrivilegeEscalation: false, all capabilities dropped, RuntimeDefault seccomp, runc handler.
  • Node: Bottlerocket 1.68.1 (aws-k8s-1.36), kernel 6.18.56, containerd 2.2.9. SELinux enforcing, Landlock ABI v7 available.

Image and policy

  • The entrypoint is a statically linked binary at /usr/local/bin/<entrypoint>, mode 0755, owned root:root. Every directory on the path (/, /usr, /usr/local, /usr/local/bin) is 0755 root:root. The only top-level symlinks are the merged-usr /bin, /lib and /sbin.
  • The workspace root /sandbox is owned by UID/GID 1000, mode 0755.
  • Filesystem policy: include_workdir: true, Landlock best_effort. Read-only paths are /usr, /lib, /proc, /dev/urandom, /dev/zero, /app (absent from the image), /etc and /var/log. Read-write paths are /sandbox, /tmp and /dev/null.

What happens

Workload (boundary runtime) log with OPENSHELL_LOG_LEVEL=debug, HTTP/2 noise removed:

INFO  openshell_sandbox::boundary_server::linux: Boundary control dialer ready
DEBUG openshell_sandbox::process: runtime PID limit detected
OCSF CONFIG:PROBED [INFO] Landlock filesystem sandbox available [abi:v7 compat:BestEffort ro:8 rw:3]
OCSF CONFIG:APPLYING [INFO] Applying Landlock filesystem sandbox [abi:V3 compat:BestEffort ro:11 rw:3]
DEBUG openshell_sandbox::sandbox::linux::landlock: Skipping non-existent Landlock path for current user
DEBUG openshell_sandbox::sandbox::linux::landlock: Landlock allow read-only      (x10)
DEBUG openshell_sandbox::sandbox::linux::landlock: Landlock allow read-write     (x3)
OCSF CONFIG:BUILT [INFO] Landlock ruleset built [rules_applied:13 skipped:1]
WARN  openshell_sandbox::boundary_server::linux: Sandbox Protocol connection lost; workload frozen pending authenticated recovery
...
ERROR openshell_sandbox::boundary_server::linux: Sandbox Protocol recovery deadline expired; terminating workload

Supervisor:

INFO openshell_supervisor: Isolation boundary attached
INFO openshell_supervisor: Isolation boundary enforcement confirmed
Error:   × process error: boundary process leaf: start process supervisor leaf:   ×
  │ spawn delegated workload process
  │   ├─▶ failed to spawn sandbox entrypoint process '/usr/local/bin/<entrypoint>'
  │   ╰─▶ Permission denied (os error 13)

What we ruled out

  • Landlock. The kernel's Landlock audit records (types 1423/1424) show exactly one denial in the window: the runtime's own probe of /tmp/openshell-landlock-probe-…/denied/sentinel (blockers=fs.read_file, denials=1). So Landlock audit works for this process, and there's no record for the entrypoint execve or the chdir about 400 ms later. Ruleset construction also reports no inaccessible or symlink-rejected paths; the one skip is the absent /app.
  • SELinux. There are no AVC denials for the sandbox processes in the window.
  • seccomp. Going by the v0.1.9 source, the child self-protection and workload filters return EPERM or kill, not EACCES. The user-notification listener continues ordinary opens and only answers EACCES for provider-file paths.
  • Image permissions. See above. The entrypoint is static, so no dynamic loader is involved.
  • Errors in the pre_exec closure. Those are wrapped as text (std::io::Error::other). A bare Permission denied (os error 13) leaf points at the child's chdir(workspace root) or execve.

Observation that may matter

In the workload Pod, the only binaries executed before the failure come from the runtime's emptyDir: the container command is /.openshell/runtime/openshell-sandbox, and the workspace-seed init container runs the same binary. The entrypoint is the first executable run from the image's own idmapped rootfs, and the first run from the delegated launcher thread. We haven't confirmed whether executing any image binary from that thread works, for example /bin/true as the entrypoint.

Expected

The entrypoint runs, as it did on v0.1.6 with the same image, policy and user namespaces enabled.

Questions

  1. Did v0.1.9 change how the delegated launcher sets up the child (credentials, working directory, mount view) in a way that interacts with hostUsers: false and idmapped rootfs mounts?
  2. Is there a supported way to get the failing syscall and path (chdir versus execve) logged from the boundary runtime? At debug level, the Landlock path fields aren't printed either.

Activity

  1. ewhauser commented on Nov 23, 2026

    @ewhauser
    Author

    This ended up being an issue with the sandbox image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:triage-neededOpened without agent diagnostics and needs triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions