Actor rootfs `/` is mode 0700, so non-root users cannot traverse the root filesystem
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 76/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- go, linux
- Área
- operating-systems
Línea de trabajo
Comienza en internal/imagecache/bundle_linux.go:61-66 e inspecciona cómo se crean rootfs, upper y work antes del montaje overlay en la línea 81. Lee applyDirFixups en internal/imagecache/implicitdirs.go para determinar si se gestiona la raíz combinada. Se considera terminado cuando la raíz de una imagen estándar sigue siendo recorrible por usuarios que no son root y existe una comprobación de regresión para el comportamiento 0700 de la raíz reportado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
Inside a gVisor actor, the root directory / is root:root 0700. A workload that drops to a non-root user cannot resolve any path at all, not even /bin/sh, because the first path component is not traversable. Docker and containerd keep the image root's mode (normally 0755). As shipped, any non-root workload fails on Substrate.
Impact
- Who hits it: every integrator whose workload runs as, or switches to, a non-root user. Agent runtimes and most hardened images do this.
- What breaks:
su,runuserand any exec as a non-root uid fail withPermission denied. The workload cannot start. - Cost: each integrator has to add a root-privileged fixup at actor start.
- Severity: High.
- Proposed priority: P1. It blocks non-root workloads out of the box. A workaround exists but needs root at startup, which depends on the uid-0 start (see Workload has no
userfield or no-new-privileges setting…).
Environment
- Substrate
d277088b(v1alpha). - GKE 1.36.x.
- gVisor sandbox class, unprivileged WorkerPool workers.
Steps to reproduce / evidence
- Create the actor (verified live). Use an ActorTemplate whose image is a Debian-based image with a non-root user (for example
useradd -u 1000 agent). Create an actor from it. - Check the root mode inside the actor, as root (verified live):
$ stat -c '%a:%U:%G %n' / 700:root:root / - Switch to the non-root user (verified live):
$ su agent -s /bin/sh -c id su: failed to execute /bin/sh: Permission denied/bin/shis itself 0755. The failure is at the traversal of/. - Show that a 0755 root is sufficient (verified live). After
chmod 755 /(as root),suandrunuserto the non-root uid both succeed. The same test also chowned the user's home directory; the exec itself (su … -c id) depends only on/being traversable. - Cause (code-read at
d277088b):internal/imagecache/bundle_linux.go:61-66creates<bundle>/rootfs,upperandworkwithos.MkdirAll(d, 0o700).- The overlay is then mounted at
rootfswith that upperdir (bundle_linux.go:81). - The merged overlay root takes its attributes from the upperdir root.
applyDirFixupsininternal/imagecache/implicitdirs.gorepairs implicit parent directories. It does not appear to cover/itself.
Expected vs actual
- Expected: the actor's
/has the image root's mode (0755 for standard base images), as under Docker, containerd and Kubernetes. - Actual:
/is 0700 and owned by root. No non-root uid can traverse it.
Workaround
At actor start, while still uid 0, an integrator can:
chmod 755 /if/is more restrictive than that.- Check that the workload user can traverse the rootfs (for example that
/bin/shresolves). - Fail closed if it cannot.
This only works because the workload starts as root.
Additional detail
- Suggested fix: create the bundle rootfs/upperdir root with 0755, or copy the image root's mode onto it after the overlay is mounted.
- Related issues (same class, image metadata lost in the actor rootfs):
- Image-layer file ownership appears as uid 0 inside the actor (
image-layer-file-ownership-lost.md). - Actor rootfs drops setuid, setgid and sticky bits from image layers (
/tmpis 0777) (actor-rootfs-drops-special-mode-bits.md).
- Image-layer file ownership appears as uid 0 inside the actor (
- Lenguaje dominante
- Go
- Estrellas
- 5.9k
- Forks
- 637
- Merge medio
- 2 d 10 h
- PR fusionados (30 d)
- 562
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de agent-substrate/substrate
-
kubectl-ate create actor-template -f <file> fails with useless errorPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoarea/cli kind/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
agent-substrate/substrate#3406 ·
Los mantenedores suelen responder en 1 día
-
k8s-credential-provider manifest is missing ate-otel-config envFrom, failing OTLP metric exports to [::1]:4317 / 127.0.0.1:4317 every 60sPosiblemente ocupada @ericcurtin la tomó hace 1 día. Abiertoarea/dev-infra area/observability area/security kind/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
agent-substrate/substrate#3282 ·
Los mantenedores suelen responder en 1 día
-
filecachegc.runPass suppresses eviction logs when FreedBytes < target and consecutiveShortfalls > 3Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoarea/node area/observability area/storage kind/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
agent-substrate/substrate#3281 ·
Los mantenedores suelen responder en 1 día
-
docs/egress-trust-bundle.md documents ActorTemplate as a Kubernetes CRD rejected by kubectl ate create actor-template and uses mismatched trust-bundle mount pathsPosiblemente ocupada @moficodes la tomó hace 1 día. Abiertoarea/network area/security kind/docs
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
agent-substrate/substrate#3278 ·
Los mantenedores suelen responder en 1 día
-
[bug bash] Actor logs are controlled by Kubernetes RBAC on the pool namespace, not atespace rolesAbiertoarea/cli area/security bug-bash kind/docs
Dificultad 1/5 1-3 horas Aptitud para principiantes 80/100
agent-substrate/substrate#3242 ·
Los mantenedores suelen responder en 1 día
Todos los issues de agent-substrate/substrate
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
google/go-containerregistry#2491 ·
Los mantenedores suelen responder en 1 día
-
aiac enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
phase:v1 type:harness
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
scttfrdmn/burroughs#1181 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
compiler-explorer/ce-ci#28 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día