Skip to content

Allow setgroups in user namespaces#10741

Merged
samuelkarp merged 1 commit intocontainerd:mainfrom
mbaynton:userns-allow-setgroups
Oct 17, 2024
Merged

Allow setgroups in user namespaces#10741
samuelkarp merged 1 commit intocontainerd:mainfrom
mbaynton:userns-allow-setgroups

Conversation

@mbaynton
Copy link
Copy Markdown
Contributor

@mbaynton mbaynton commented Sep 27, 2024

Fixes #10742

@k8s-ci-robot
Copy link
Copy Markdown

Hi @mbaynton. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@rata
Copy link
Copy Markdown
Contributor

rata commented Oct 17, 2024

@mbaynton thanks for catching this!

I can confirm (I've just verified it) that before #10607 the userns was created by runc and setgroups was "allow". crun does the same. There is no field in CRI nor runtime-spec to toggle this, so adding it unconditionally here as this PR does, seems the right thing to me. I've also read the manpage, the security considerations stated there don't really apply for our usage (probably why runc and crun default to true too).

@mbaynton can you amend the commits (not add a commit that later removes the change), sign-off the commits (CI is failing due to that) and make sure CI passes fine? Right now most test haven't run because of those failures.

cc @fuweid

@rata
Copy link
Copy Markdown
Contributor

rata commented Oct 17, 2024

It would be great to add this to the 2.0 milestone too.

@estesp
Copy link
Copy Markdown
Member

estesp commented Oct 17, 2024

None of these commits have a Signed-off-by: .. so CI is not running. Can you squash the commits into one and add a Signed-off-by: First Last <email@address.com> as the last line of the commit? Thanks!

Signed-off-by: Mike Baynton <mike@mbaynton.com>
@mbaynton mbaynton force-pushed the userns-allow-setgroups branch from b6d6286 to 347423a Compare October 17, 2024 20:38
@estesp estesp added this to the 2.0 milestone Oct 17, 2024
Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; more detail in the linked issue; @containerd/maintainers I believe this regression needs to be fixed and added it to 2.0 milestone. Please review ASAP

@estesp
Copy link
Copy Markdown
Member

estesp commented Oct 17, 2024

/ok-to-test

@samuelkarp samuelkarp added this pull request to the merge queue Oct 17, 2024
@mbaynton
Copy link
Copy Markdown
Contributor Author

Thanks @rata and @estesp for your pointers and help with getting this moving.

Sorry on the signoff, I trusted the bot that the next thing required was someone needed to mark ok-to-test, and was probably too pessimistic for my own good that the PR would be noticed :)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

setgroups denied in user namespaces

5 participants