seccomp: allow fanotify_init without CAP_SYS_ADMIN#35
Open
ychampion wants to merge 1 commit into
Open
Conversation
Allow the kernel to apply its post-5.13 capability restrictions instead of rejecting fanotify_init at the seccomp layer. Constraint: Unprivileged fanotify groups remain limited by the kernel API. Rejected: Gate the syscall on a minimum kernel version | older kernels already reject unprivileged callers with EPERM. Confidence: high Scope-risk: narrow Directive: Keep default.json generated from default_linux.go. Tested: Full module tests and vet; seccomp race tests; five Linux cross-builds; golangci-lint 2.12.2; stable code generation. Not-tested: End-to-end Docker daemon reproduction. Signed-off-by: ychampion <ychampion@users.noreply.github.com>
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
fanotify_initinto the unconditional default allow listseccomp/default.jsonWhy
Linux 5.13 and the 5.10.220 stable backport allow callers without
CAP_SYS_ADMINto create limited fanotify groups. The current profile rejectsfanotify_initbefore the kernel can apply those restrictions.Fixes moby/moby#49756.
Validation
make testmake crossbuildgo test -race ./...inseccompgo vet ./...in both modulesgolangci-lint run ./...in both modulesgo generate ./...inseccompwith an unchanged generated-file hashAn end-to-end Docker daemon reproduction was not run locally.