Skip to content

fix(wrap): explicitly fail if the declared cgroup cannot be joined - #196

Merged
bleggett merged 1 commit into
edera-dev:mainfrom
bleggett:bleggett/fail-closed-cgroup-join
Oct 26, 2026
Merged

bleggett merged 1 commit into
edera-dev:mainfrom
bleggett:bleggett/fail-closed-cgroup-join

Conversation

@bleggett

Copy link
Copy Markdown
Contributor

Before, if a cgroup could not be joined, the exec would continue, in the wrong cgroup, without the caller realizing it.

This changes the code such that if the attach fails, attach falls back to the target process's cgroup, as runc's exec does, and fails only if that also fails.

This is technically a breaking change, but it is a better security posture: a create or attach whose named cgroup cannot be joined used to warn and silently run the process outside that cgroup - now, it fails explicitly.

@bleggett
bleggett merged commit 84f0903 into edera-dev:main Oct 26, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants