You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes confirmed by a multi-lens adversarial review of this session's CRI work:
HIGH:
- Security: a container image/pod env entry named A3S_SEC_* could spoof the
runtime security envelope (the guest matches first-wins), escalating
supplemental groups / unmasking paths / toggling seccomp. CreateContainer now
strips all caller-supplied A3S_SEC_* before adding the runtime's trusted ones.
- Async-signal-safety: the default seccomp BPF filter was built (heap alloc)
INSIDE the post-fork pre_exec child — malloc can deadlock there on musl
(multi-threaded guest). Split into build_default_bpf_filter (pre-fork) +
install_seccomp_filter (syscalls only); both CRI-exec and box-run paths build
the filter before fork and only install it in the child.
- Mount leak: MaskedPaths/ReadonlyPaths were re-applied on every exec, stacking
unbounded mounts on each liveness/readiness probe. apply_container_path_restrictions
is now idempotent (mountpoint / ST_RDONLY checks).
MEDIUM:
- Graceful shutdown reaping was skipped when the gRPC server returned Err (`?`);
it now always reaps, then propagates the error.
- Non-Linux build fix: setgroups count cast (size_t vs BSD c_int) -> `as _`.
- Path-traversal hardening: reject MaskedPaths/ReadonlyPaths and sysctl names
containing `..` / `/` before joining onto the rootfs / /proc/sys path.
LOW:
- Localhost seccomp profiles now warn instead of silently downgrading.
- Corrected the misleading default-seccomp doc comment.
- A3S_SEC_* control vars are no longer leaked into the workload's environment.
Verified on the KVM server: build + clippy clean, 219 cri tests pass, and
seccomp-default / ReadonlyPaths / safe-sysctls / RemoveContainer-running all
still pass (no regression from the refactor).
0 commit comments