-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
error adding seccomp filter rule for syscall bdflush: permission denied: OCI permission denied #11005
Comments
Does this work with crun? Could you make sure you have the latest runc 1.0.1? |
@rhatdan It works with runc. And I have downloaded the latest runc 1.0.1 from https://github.com/opencontainers/runc/releases, I think it's the latest runc 1.0.1. |
Try #10885 (comment) |
@giuseppe @AkihiroSuda Any idea what is going on? Is this a problem with an older libseccomp? |
A too old runc. runc 1.0 works fine |
I used https://github.com/opencontainers/runc/releases/download/v1.0.1/runc.amd64 but still have the same problem
|
@giuseppe Can you post the output of |
If runc is new enough, it's possible libseccomp is not. |
Well, I just discovered this independently. The fix is opencontainers/runc#3109 |
For some reason, podman do not set [kir@kir-rhat common]$ grep default /usr/share/containers/seccomp.json
"defaultAction": "SCMP_ACT_ERRNO",
"defaultErrnoRet": 38,
[kir@kir-rhat common]$ podman run -d fedora sleep 1h
d7e1cbad58a52998ac5e3a950ceb40c385a8bf8fb8f3eed6aa14fa721b3f33df
[kir@kir-rhat common]$ jq < /home/kir/.local/share/containers/storage/overlay-containers/d7e1cbad58a52998ac5e3a950ceb40c385a8bf8fb8f3eed6aa14fa721b3f33df/userdata/config.json | grep default
"defaultAction": "SCMP_ACT_ERRNO", ... and so there are redundant rules, that were always rejected by runc: [kir@kir-rhat common]$ jq .linux.seccomp < /home/kir/.local/share/containers/storage/overlay-containers/d7e1cbad58a52998ac5e3a950ceb40c385a8bf8fb8f3eed6aa14fa721b3f33df/userdata/config.json | head -50
{
"defaultAction": "SCMP_ACT_ERRNO",
"architectures": [
"SCMP_ARCH_X86_64",
"SCMP_ARCH_X86",
"SCMP_ARCH_X32"
],
"syscalls": [
{
"names": [
"bdflush",
"io_pgetevents",
"kexec_file_load",
"kexec_load",
"migrate_pages",
"move_pages",
"nfsservctl",
"nice",
"oldfstat",
"oldlstat",
"oldolduname",
"oldstat",
"olduname",
"pciconfig_iobase",
"pciconfig_read",
"pciconfig_write",
"sgetmask",
"ssetmask",
"swapcontext",
"swapoff",
"swapon",
"sysfs",
"uselib",
"userfaultfd",
"ustat",
"vm86",
"vm86old",
"vmsplice"
],
"action": "SCMP_ACT_ERRNO",
"errnoRet": 1
},
{
"names": [
"_llseek",
"_newselect",
"accept",
"accept4",
"access",
"adjtimex",
[kir@kir-rhat common]$ |
[kir@kir-rhat common]$ rpm -q podman containers-common
podman-3.2.2-1.fc34.x86_64
containers-common-1-20.fc34.noarch I think this was recently fixed by #10690, and did not made its way to F34 yet. Confirming that latest git tip works: [kir@kir-rhat libpod]$ ./bin/podman version
Version: 3.3.0-dev
API Version: 3.3.0-dev
Go Version: go1.16.5
Git Commit: e6fb92f4782e2405d051c0ff1fcd13796c4cd575
Built: Fri Jan 2 02:15:45 1970
OS/Arch: linux/amd64
[kir@kir-rhat libpod]$ ./bin/podman run -d fedora sleep 1h
6d7eb4c152e070b00a1d18204fcbbe17a7d16818707f85c2cad7eaf49cd8dc67
[kir@kir-rhat libpod]$ jq < /home/kir/.local/share/containers/storage/overlay-containers/6d7eb4c152e070b00a1d18204fcbbe17a7d16818707f85c2cad7eaf49cd8dc67/userdata/config.json | grep efau
"defaultAction": "SCMP_ACT_ERRNO",
"defaultErrnoRet": 38,
[kir@kir-rhat libpod]$ ./bin/podman run --runtime=/usr/bin/runc fedora echo works
works |
... which brings in containers/common#573 |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Failed to start container with runc.
Steps to reproduce the issue:
I have installed the latest release version runc.
podman run --runtime /usr/sbin/runc --cgroup-manager=cgroupfs --network=host --pid=host --ipc=host centos:8 ls -al /sys/fs/cgroup/memory/
Describe the results you received:
Error: container_linux.go:380: starting container process caused: error adding seccomp filter rule for syscall bdflush: permission denied: OCI permission denied
Describe the results you expected:
Container can start successfully.
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
The text was updated successfully, but these errors were encountered: