common: error adding seccomp filter rule for syscall bdflush: permission denied

https://github.com/containers/common/pull/573 Causes an error on Ubuntu when running any container using cri-o-runc 1.0.0~rc95.1. It also happens (not too unexpectedly) from buildah bud (first identified here). The problem does not occur when using the prior version of containers-common (which doesn’t contain the #573 changes).

# podman --runtime=runc run -it --rm quay.io/libpod/alpine:latest echo hello
Error: container_linux.go:380: starting container process caused: error adding seccomp filter rule for syscall bdflush: permission denied: OCI permission denied

Conveniently, I have two VM Images built 3-days apart which bisect the problem versions. See test PR https://github.com/containers/podman/pull/10709

  • c4635821094469632 built on the 13th does not reproduce the problem (containers-common 1_15)
  • c4805484248039424 built on the 16th does reproduce the problem (containers-common 1_16)

Hint: If you check out commit 9efcf62 from that PR, you can use hack/get_ci_vm.sh int podman ubuntu-2010 root host to see it break. Commit f4c50f6 will get you the prior version VM (without the problem).

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 33 (21 by maintainers)

Commits related to this issue

Most upvoted comments

FWIW, if anyone ends up here for podman issues regarding this error on RHEL, RHEL 8.4 has a borked version of runc whilst updating to RHEL 8.5’s bundled runc fixes the error. 🚀

@dtchanpura did you have crun installed when you ran that test? I have found that (at least on arch linux) containers-common will default to crun if it’s installed, which is not affected by this issue. So an effective workaround for arch users with the default configuration is to just install crun. Others may need to set runtime=“crun” in contianers.conf.

Arch bug report here: https://bugs.archlinux.org/task/71397

Issue resolved after rolling back to containers-common 0.39.0

sudo pacman -U https://archive.archlinux.org/packages/c/containers-common/containers-common-0.39.0-4-any.pkg.tar.zst

@ryester27 I’m also having this issue on Arch Linux with containers-common 0.40.0, podman 3.2.1, and runc 1.0.0rc95. However, replacing /etc/containers/seccomp.json with the file from containers-common 0.39.0 is a workaround and lets containers starts properly, albeit at the expense of less strict seccomp filters, I guess.

Contrary to @dtchanpura, this is still broken for me.

> pacman -Q containers-common podman runc                                                                                                                                        
containers-common 0.40.1-1
podman 3.2.2-1
runc 1.0.0-1
> podman run -it --rm ubuntu:20.04
Error: container_linux.go:380: starting container process caused: error adding seccomp filter rule for syscall bdflush: permission denied: OCI permission denied

It works if I downgrade to containers-common-0.39.0-4.

> pacman -Q containers-common podman runc        
containers-common 0.39.0-4
podman 3.2.2-1
runc 1.0.0-1
> podman run -it --rm ubuntu:20.04
root@c06728581153:/#

If I remove bdflush from seccomp.json, it just fails with a different error:

Error: container_linux.go:380: starting container process caused: error adding seccomp filter rule for syscall io_pgetevents: permission denied: OCI permission denied

I’m on Debian Bullseye facing this issue after building Podman from source. There’s no clear fix given that Debian doesn’t use Pacman here.

What’s the solution? Bullseye is currently the latest version that gets security updates, and current stable podman seems to entirely ignore .containerignore (a separate issue I’m ultimately trying to evaluate). Hence building from source.

EDIT: Turns out crun wasn’t installed. Installing it fixed the issue. Some better error messages are really needed here.

Thanks for pointing out the crun workaround! (rootless) containers start working again as soon as i install the crun package.

These are my versions:

$ pacman -Q containers-common podman runc crun
containers-common 0.40.1-1
podman 3.2.2-1
runc 1.0.0-1
crun 0.20.1-1

@darrellenns Sorry about that, I did not see other dependencies, but yes, I do have crun installed as a dependency for buildah and it coincided with the runc update so couldn’t distinguish if that was because of runc or crun.

~ ❯ pacman -Q crun runc podman containers-common
crun 0.20.1-1
runc 1.0.0-1
podman 3.2.2-1
containers-common 0.40.1-1

Edit: I could reproduce the issue removing buildah and crun.

Can we close this issue?

@cevich I’ve seen the error “container_linux.go:380: starting container process caused: error adding seccomp filter rule for syscall bdflush: permission denied: OCI permission denied” with versions of runc older than 1.0-rc95.

Could we first double check the runc version?

Having the same problem with containers-common-0.40.0-1, and my Arch Linux setup has runc 1.0.0rc95-1