Repository navigation
fix(sandbox): setgroups deny + euid rootfs prepare for setpriv CI - #333
Merged
Merged
Conversation
HostSandbox OCI userns sets /proc/self/setgroups=deny, so applying image supplemental groups before setuid returned EPERM and blocked non-root entrypoints. Keep primary uid/gid, and put tmpfs nosuid/nodev in mount flags so WSL kernels do not EINVAL on duplicated superblock options. Co-authored-by: Cursor <[email protected]>
setpriv CI uses non-root ruid with euid 0. Ownership prepare previously keyed off the durable identity and skipped translation, so snapshot capture saw raw host UID 0 outside OCI mappings. Gate prepare on geteuid() instead. Co-authored-by: Cursor <[email protected]>
Unit tests and root-service semantics pass effective_uid == 0 to request ownership translation even when the process euid is non-root. Combine that with the setpriv euid==0 path so fully non-root services still skip prepare. Also rustfmt contextual pre_exec error wrapping. Co-authored-by: Cursor <[email protected]>
2 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/proc/self/setgroups=deny. Applying image supplemental groups viasetgroups(2)beforesetuidreturnedEPERMand blocked non-root entrypoints (/usr/bin/a3sas uid 65532). Skip supplementalsetgroupswhen notallow; primary uid/gid still apply.nosuid/nodevin mount flags only (not duplicated in tmpfs data) so kernels that reject unknown tmpfs parameters (e.g. some WSL builds) do not returnEINVAL.geteuid()==0instead.Local evidence (not retained CI)
On Cloud tip
5be6a62with a Box pin carrying these patches:postgres_skill_workload_binding_rebind_unbind_and_rollback_run_through_real_box→A3S_CLOUD_A0_5_REAL_BOX_SKILL_LIFECYCLE_CERTIFIED(cleanup=removed)postgres_published_agent_release_runs_recovers_and_cleans_through_real_box→A3S_CLOUD_A0_4_REAL_BOX_RELEASE_CERTIFIED(cleanup=removed)Test plan
setgroups_permitted_matches_proc_file_when_presenta3s --versionas 65532)