Description
Description
Hello,
We are using Ubuntu 22.04 in our environment. One docker container using ".." in its bind mount paths stopped starting with this new runc v1.3.3 version. Full error being thrown is:
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error closing exec fds: get handle to /proc/thread-self/fd: unsafe procfs detected: openat2 fsmount:fscontext:proc/thread-self/fd/: function not implemented: unknown
The additional info I received is:
This issue is related to a regression introduced in the Ubuntu runc package version [1.3.3-0ubuntu1~22.04.2]
The problem originates from an Ubuntu-specific patch (openat2-improve-resilience-on-busy-systems.patch) that breaks container startup on some systems or kernel versions.
Steps to reproduce the issue
- On Ubuntu 22.04 machine install runc version: 1.3.3-0ubuntu1~22.04.2
- Try to start any docker container using ".." in its bind mount paths
- Error is thrown
Describe the results you received and expected
Received:
Docker container does not start. This error is thrown:
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error closing exec fds: get handle to /proc/thread-self/fd: unsafe procfs detected: openat2 fsmount:fscontext:proc/thread-self/fd/: function not implemented: unknown
Expected:
Docker container is successfully started
What version of runc are you using?
user@host ~$ runc --version runc version 1.3.3-0ubuntu1~22.04.2 spec: 1.2.1 go: go1.23.1 libseccomp: 2.5.3 user@host ~$
Host OS information
user@host ~$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.5 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.5 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
user@host ~$
Host kernel information
user@host ~$ uname -a
Linux host 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
user@host ~$
Activity
cyphar commentedon Nov 12, 2025
This patch isn't Ubuntu-specific -- the patch is upstream in a41366e, and I also don't think this is the cause of the error (that patch just increased the retry amount when using
openat2but the error is coming from code added in an earlier patch -- ff6fe13).🤔... This really doesn't make sense. This error (
ENOSYS) is returned when a system call is not supported by the running kernel. However:pathrs-litechecks for whetheropenat2is supported and has a different fallback for older kernels. This code is very extensively tested on Ubuntu 22.04 ingithub.com/cyphar/filepath-securejoin's CI.openat2was added to Linux in 5.6, and the kernel for Ubuntu 22.04 (as your own bug report states) is 5.15. So I'm incredibly confused where this error would come from...I'll need to try to reproduce this in a VM (I can't reproduce it on my machine). Can you give me an example
docker runcommand-line (using a public image if necessary) that fails with the error you've provided?zkolpet commentedon Nov 12, 2025
Unfortunately I don't have any public docker image example. This failure is happening within our proprietary docker image which I can't share.
Is there any other way to troubleshoot this?
cyphar commentedon Nov 12, 2025
I guessed as much, can you try to create a minimal example using a public docker image? If the issue is just a bind-mount with
..then I would expectto fail with the error you described, but it doesn't on my machine.
lifubang commentedon Nov 13, 2025
Might this be caused by
seccomp filters? We callHasOpenat2just once.zkolpet commentedon Nov 13, 2025
@cyphar
I was able to also start this alpine docker container in the same environment in which the other (our) docker container is failing to start with above mentioned error.
Is there anything specific which I could check/verify on our side? Some configuration/logs/anything?
zkolpet commentedon Nov 13, 2025
@cyphar
I can see identical issue being discussed here for zenika/alpine-chrome:
jlandure/alpine-chrome#272
Might be helpful.
cyphar commentedon Nov 13, 2025
Ah wait,
CloseExecFromis called after we apply seccomp (and presumably you are using a custom profile which doesn't permitopenat2) -- I think you might be right @lifubang...In that case we need to do a fallback even if openat2 was supported when we first attempted it. (Or we can just remove the caching in
linux.HasOpenat2, though we could cache as soon as we hit a failure...)EDIT: Another choice would be to see if the value of
Seccomp_filtersin/proc/thread-self/statushas changed, but this will require more syscalls than we would save just testingopenat2each time. We can also not bother pre-checkingopenat2but I'm a little worried about possible "downgrade attacks" this would open us up to.shismaha-te commentedon Nov 13, 2025
@cyphar We are also seeing this exact error in our environments (
ubuntu:22.04) with newer versions ofrunc(1.4.0). Older version ofrunc(1.1.14) is working fine.If I add (allow) the following system calls in my seccomp profile:
I am able to get past the error (with newer runc
1.4.0). However, with both newer and olderrunc, when I allow these syscalls, my containers are getting restarted frequently. In the docker logs, I see these delete task events.shismaha-te commentedon Nov 13, 2025
@cyphar The restarting of containers was a red herring, mostly a config issue/setup in our environment.
For the error reported:
We were able to add the above system calls to our seccomp profile and that seems to work with
runc-1.3.3lifubang commentedon Nov 14, 2025
Hi @zkolpet @shismaha-te,
Could you please share the config.json file for the failing container? You can retrieve it by following these steps:
cyphar commentedon Nov 14, 2025
@lifubang I already know what the issue is -- see #5007 (comment), I'm working on a patch.
Though, the same issue should not be present for syscalls other than
openat2(2)(i.e., it should not be necessary to permit other syscalls) -- we have a fallback toopen("/proc")for any errors when trying to use the new mount API:(This is different to
openat2, which only relies on the cached information and thus causes issues.)Also, we use a cached procfs for
/proc/thread-selfso seccomp being applied doesn't matter with the current implementation. I tested #5015 withopenat2enabled and it works.lifubang commentedon Nov 14, 2025
Yes — because we’ve cached the file descriptor returned by
fsmount, we don’t need to callfsmountorfsopenagain after applying the seccomp filters. Therefore, there’s no need to allow the new mount API in the seccomp policy.cyphar commentedon Nov 14, 2025
I think it wouldn't be an issue even without caching (see
getProcRoot).zkolpet commentedon Nov 14, 2025
@cyphar
so you already know what the issue is and you are working on the fix OR should I provide anything from our side for further troubleshooting?
cyphar commentedon Nov 14, 2025
cyphar/filepath-securejoin#82 will fix the issue.
zkolpet commentedon Nov 14, 2025
I see. Any estimation on when this could be merged and new version released?
cyphar commentedon Nov 14, 2025
I would aim for next week, I would prefer to do a 1.4.0 release along with 1.3.4 (and probably 1.2.9) at the same time.
shismaha-te commentedon Nov 20, 2025
@cyphar I know most customers don't upgrade
runcdirectly, but rather upgradedocker-ce(and docker pins to a specific version ofrunc). Do you know which version ofdocker-cewill have the fixed version ofrunc(which fixes this issue)?If we know the version (it's okay if that is not known today, but just wanted to check if we ll be able to know that at some point in time), we can just ask our customers to upgrade to that docker version.
cyphar commentedon Nov 20, 2025
I don't know ahead of time, once a new runc is released Docker will have a patch release which bumps the runc version they package. The information will be in their release notes.
As for most customers having pinned runc versions, that depends on where they get their packages from. Upstream distribution packages usually don't pin the runc version, you automatically use the latest one packaged by the distro.
fix: use ubuntu-24.04 to avoid runc 1.3.3 bug
runc: bump to 1.4.0