Description of problem:
Due to the way various container runtimes set up seccomp filters, libseccomp needs to be updated for new system calls even though the host kernel does not support them. Otherwise, it is not possible to produce an ENOSYS error for them.
Version-Release number of selected component (if applicable):
libseccomp-2.3.1-4.el7.x86_64
How reproducible:
Always.
Steps to Reproduce:
Install Docker CE, in these package versions:
containerd.io-1.4.3-3.1.el7.x86_64
libseccomp-2.3.1-4.el7.x86_64
docker-ce-rootless-extras-20.10.1-3.el7.x86_64
docker-ce-20.10.1-3.el7.x86_64
docker-ce-cli-20.10.1-3.el7.x86_64
container-selinux-2.119.2-1.911c772.el7_8.noarch
This version has faccessat2 support on the Docker CE side.
Then run:
docker run fedora:rawhide /bin/bash -c "yum update -y glibc; bash -c 'test -r /tmp; echo \$?'"
Quoting is a bit tricky here. The inner bash is needed to pick up the new glibc.
Actual results:
1
(faccessat2 return EPERM.)
Expected results:
0
(faccessat2 return ENOSYS, and faccessat fallback is used.)
Additional info:
I rebuild libseccomp 2.5.1 from the upstream sources and verified that it fixes the seccomp filters. But knowledge of the new system calls can likely be backported separately.
As it seems that there is no more need to add new syscalls to libseccomp on rhel-7.9, I will close this bz. However, it can be reopened if needed in the future.
Comment 5Vratislav Podzimek
2021-05-04 21:00:22 UTC
Please note that this also happens with buildah:
$ c=$(buildah from fedora:34)
$ buildah run $c /bin/bash
# test -x /
# echo $?
1
# exit