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

invalid seccomp syscall 'io_uring_enter': unknown. #156

Closed
AkihiroSuda opened this issue Nov 5, 2019 · 6 comments · Fixed by #158
Closed

invalid seccomp syscall 'io_uring_enter': unknown. #156

AkihiroSuda opened this issue Nov 5, 2019 · 6 comments · Fixed by #158

Comments

@AkihiroSuda
Copy link

crun doesn't work with latest moby seccomp profile because crun doesn't support io_uring_enter .

moby/moby@f4d41f1

@giuseppe
Copy link
Member

giuseppe commented Nov 5, 2019

that is a libseccomp issue: seccomp/libseccomp#177

There is not a release yet that includes that syscalls, but the version from master works fine

For Fedora, we are working on backporting these patches to libseccomp

@AkihiroSuda
Copy link
Author

Can crun ignore seccomp entries for unknown syscalls?

@giuseppe
Copy link
Member

giuseppe commented Nov 5, 2019

Can crun ignore seccomp entries for unknown syscalls?

wouldn't that be a potential security issue if the syscall is blocked?

And if we skip syscalls that are allowed, then the container can fail despite a correct configuration.

Are you using a static build for crun? Perhaps we could build seccomp from git master there

giuseppe added a commit to giuseppe/crun that referenced this issue Nov 5, 2019
@giuseppe
Copy link
Member

giuseppe commented Nov 5, 2019

I've opened a PR for using seccomp from master: #158

@justincormack
Copy link

I think it is better to ignore unknown syscalls, otherwise it requires exactly synchronised updates of seccomp policies and libseccomp versions which is a huge burden on users. Many distros will not update libseccomp for new syscalls for kernels they are not shipping, so then you cannot change your seccomp policy at all, which makes default seccomp policies very difficult to implement at all. Almost all changes are new syscalls for new kernels, so people are rarely relying on them and will have fallbacks.

giuseppe added a commit to giuseppe/crun that referenced this issue Dec 17, 2019
when a syscall that is not known to libseccomp is specified, ignore it
instead of failing.

It makes easier to use newer seccomp policies on systems using an
older libseccomp.

It is possible to keep the previous behavior using the
"run.oci.seccomp_fail_unknown_syscall=1" annotation.

Closes: containers#156

Signed-off-by: Giuseppe Scrivano <[email protected]>
giuseppe added a commit to giuseppe/crun that referenced this issue Dec 17, 2019
when a syscall that is not known to libseccomp is specified, ignore it
instead of failing.

It makes easier to use newer seccomp policies on systems using an
older libseccomp.

It is possible to keep the previous behavior using the
"run.oci.seccomp_fail_unknown_syscall=1" annotation.

Closes: containers#156

Signed-off-by: Giuseppe Scrivano <[email protected]>
@giuseppe
Copy link
Member

I think it is better to ignore unknown syscalls, otherwise it requires exactly synchronised updates of seccomp policies and libseccomp versions which is a huge burden on users. Many distros will not update libseccomp for new syscalls for kernels they are not shipping, so then you cannot change your seccomp policy at all, which makes default seccomp policies very difficult to implement at all. Almost all changes are new syscalls for new kernels, so people are rarely relying on them and will have fallbacks.

thanks for the explanation. That makes sense to me. I've added a patch to a PR I was already working on (just to avoid rebases) and I've switched the default to not fail when an unknown syscall is found in the seccomp profile: #211

giuseppe added a commit to giuseppe/crun that referenced this issue Dec 17, 2019
when a syscall that is not known to libseccomp is specified, ignore it
instead of failing.

It makes easier to use newer seccomp policies on systems using an
older libseccomp.

It is possible to keep the previous behavior using the
"run.oci.seccomp_fail_unknown_syscall=1" annotation.

Closes: containers#156

Signed-off-by: Giuseppe Scrivano <[email protected]>
AkihiroSuda added a commit to AkihiroSuda/docker that referenced this issue Dec 31, 2019
* Requires containerd binaries from containerd/containerd#3799 . Metrics are unimplemented yet.
* Works with crun v0.10.4, but `--security-opt seccomp=unconfined` is needed unless using master version of libseccomp
  ( containers/crun#156, seccomp/libseccomp#177 )
* Doesn't work with master runc yet
* Resource limitations are unimplemented

Signed-off-by: Akihiro Suda <[email protected]>
docker-jenkins pushed a commit to docker-archive/docker-ce that referenced this issue Jan 9, 2020
* Requires containerd binaries from containerd/containerd#3799 . Metrics are unimplemented yet.
* Works with crun v0.10.4, but `--security-opt seccomp=unconfined` is needed unless using master version of libseccomp
  ( containers/crun#156, seccomp/libseccomp#177 )
* Doesn't work with master runc yet
* Resource limitations are unimplemented

Signed-off-by: Akihiro Suda <[email protected]>
Upstream-commit: 612343618dd7dad7cf023e6263d693ab37507a92
Component: engine
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 a pull request may close this issue.

3 participants