Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

capabilities: be more graceful in resetting ambient #4597

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

evanphx
Copy link
Contributor

@evanphx evanphx commented Jan 20, 2025

Similar to when SetAmbient() can fail, runc should be graceful about ResetAmbient failing.

This functionality previously worked under gvisor, which doesn't implement ambient capabilities atm. The hard error on reset broke gvisor usage.

Similar to when SetAmbient() can fail, runc should be graceful about
ResetAmbient failing.

This functionality previously worked under gvisor, which doesn't
implement ambient capabilities atm. The hard error on reset broke gvisor
usage.
@evanphx evanphx force-pushed the evanphx/b-graceful-ambient branch from 64890be to 216d45c Compare January 20, 2025 03:58
@cyphar
Copy link
Member

cyphar commented Jan 20, 2025

I'm not sure we can safely ignore an error from dropping caps -- in theory you shouldn't get an error in practice, but if we did fail to clear the caps then running the container at that point seems unsafe (ambient caps not being dropped properly was the cause of some very old Docker CVEs IIRC).

@evanphx
Copy link
Contributor Author

evanphx commented Jan 20, 2025

Totally understand and I'm going to work on this on the gvisor side. If you don't want to accept this, totally fine. My thinking was that if we were allowing SetAmbient through, we should allow ResetAmbient through too.

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