add key retention and requesting service syscalls to the default seccomp - #2
Closed
afbase wants to merge 2 commits into
Closed
add key retention and requesting service syscalls to the default seccomp#2afbase wants to merge 2 commits into
afbase wants to merge 2 commits into
Conversation
…omp profile Signed-off-by: Clinton Bowen <clinton.bowen@gmail.com>
Signed-off-by: Clinton Bowen <clinton.bowen@gmail.com>
Author
|
same issue as describe in containers/common#2487 (comment). going to close this 😭 |
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.
Historical Context
In Late December 2015, it was decided to exclude the
add_key,keyctl, andrequest_keysyscalls in the new default seccomp profile in the moby project. The rationale was that these syscalls for the Kernel Key Retention and Kernel Key Requesting were not user namespaced.In January 2016, @jessfraz wrote about the newly released default seccomp profile. Jess also contributed to incorporating seccomp profiles into kubernetes later that year.
In 2019, @dhowells and @thejh worked on these syscalls to respect user namespace boundaries.
Why These Syscalls Are Now Safe
The original 2015 security concerns have been addressed through specific kernel code changes that ensure proper user namespace isolation. Here are some examples:
1. Namespace-Aware Keyring Access
The
add_keysyscall now operates within the caller's user namespace context throughlookup_user_key():This function ensures containers can only access keyrings that exist within their namespace boundary, preventing cross-namespace key access.
2. Namespace Validation for Key Operations
Key ownership changes are validated within the caller's namespace via
keyctl_chown_key:3. Namespace-Aware Request Key Operations
The
request_keysyscall properly handles namespace translation during userspace callouts inrequest_key.c: