[23.0 backport] seccomp: block socket calls to AF_VSOCK in default profile#44563
Merged
thaJeztah merged 1 commit intoDec 1, 2022
Merged
Conversation
This syncs the seccomp-profile with the latest changes in containerd's profile, applying the same changes as containerd/containerd@17a9324 Some background from the associated ticket: > We want to use vsock for guest-host communication on KubeVirt > (https://github.com/kubevirt/kubevirt). In KubeVirt we run VMs in pods. > > However since anyone can just connect from any pod to any VM with the > default seccomp settings, we cannot limit connection attempts to our > privileged node-agent. > > ### Describe the solution you'd like > We want to deny the `socket` syscall for the `AF_VSOCK` family by default. > > I see in [1] and [2] that AF_VSOCK was actually already blocked for some > time, but that got reverted since some architectures support the `socketcall` > syscall which can't be restricted properly. However we are mostly interested > in `arm64` and `amd64` where limiting `socket` would probably be enough. > > ### Additional context > I know that in theory we could use our own seccomp profiles, but we would want > to provide security for as many users as possible which use KubeVirt, and there > it would be very helpful if this protection could be added by being part of the > DefaultRuntime profile to easily ensure that it is active for all pods [3]. > > Impact on existing workloads: It is unlikely that this will disturb any existing > workload, becuase VSOCK is almost exclusively used for host-guest commmunication. > However if someone would still use it: Privileged pods would still be able to > use `socket` for `AF_VSOCK`, custom seccomp policies could be applied too. > Further it was already blocked for quite some time and the blockade got lifted > due to reasons not related to AF_VSOCK. > > The PR in KubeVirt which adds VSOCK support for additional context: [4] > > [1]: moby#29076 (comment) > [2]: moby@dcf2632 > [3]: https://kubernetes.io/docs/tutorials/security/seccomp/#enable-the-use-of-runtimedefault-as-the-default-seccomp-profile-for-all-workloads > [4]: kubevirt/kubevirt#8546 Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit 57b2290) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Member
Author
|
/cc @gabriellavengeo |
cpuguy83
approved these changes
Dec 1, 2022
thomlinton
added a commit
to PSU-OIT-ARC/oregoninvasiveshotline
that referenced
this pull request
Nov 1, 2023
Refs: PSU-OIT-ARC/oregon-registry-online@5b7a642 It appears that there are strange interactions when running uWSGI with the python-auto-reload option on Docker Engine 23. When code changes are detected and the worker(s) are reloaded, traffic between the proxy and application container appears to hang and the processes representing the application containers continue to consume 100% of CPU resources. Superficially, it appears this issue is related to seccomp changes released in Docker Engine 23 and backported to Docker Engine 20 (though subsequenctly reverted). Refs: https://stackoverflow.com/questions/75511524/nginxuwsgi-stops-responding-after-auto-reload Refs: https://docs.docker.com/engine/release-notes/23.0/ Refs: moby/moby#44563 Refs: moby/moby#44712
thomlinton
added a commit
to PSU-OIT-ARC/aol-backend
that referenced
this pull request
Jan 25, 2024
It appears that there are strange interactions when running uWSGI with the python-auto-reload option on Docker Engine 23. When code changes are detected and the worker(s) are reloaded, traffic between the proxy and application container appears to hang and the processes representing the application containers continue to consume 100% of CPU resources. Superficially, it appears this issue is related to seccomp changes released in Docker Engine 23 and backported to Docker Engine 20 (though subsequenctly reverted). Refs: https://stackoverflow.com/questions/75511524/nginxuwsgi-stops-responding-after-auto-reload Refs: https://docs.docker.com/engine/release-notes/23.0/ Refs: moby/moby#44563 Refs: moby/moby#44712
thomlinton
added a commit
to PSU-OIT-ARC/oregoninvasiveshotline
that referenced
this pull request
Feb 7, 2024
It appears that there are strange interactions when running uWSGI with the python-auto-reload option on Docker Engine 23. When code changes are detected and the worker(s) are reloaded, traffic between the proxy and application container appears to hang and the processes representing the application containers continue to consume 100% of CPU resources. Superficially, it appears this issue is related to seccomp changes released in Docker Engine 23 and backported to Docker Engine 20 (though subsequenctly reverted). Refs: https://stackoverflow.com/questions/75511524/nginxuwsgi-stops-responding-after-auto-reload Refs: https://docs.docker.com/engine/release-notes/23.0/ Refs: moby/moby#44563 Refs: moby/moby#44712
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.
backport:
related:
This syncs the seccomp-profile with the latest changes in containerd's profile, applying the same changes as containerd/containerd@17a9324
Some background from the associated ticket:
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)