-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Docker seccomp policy incompatible with glibc 2.34 #3812
Comments
Hello @fweimer-rh, |
@wfurt @mthalman @MichaelSimons this is the issue that we were seeing in dotnet/dotnet-buildtools-prereqs-docker#484 |
@fweimer-rh the repro build prints In my understanding this means the docker implementation currently used by github actions on ubuntu 20.04 allows glibc 2.34 bundled with the fedora:rawhide handles Can you please clarify what pipeline problem we expected to fix from out side? |
Sorry about that. It looks like your
Perhaps also log the glibc version to be sure:
|
@fweimer-rh Firstly the snipped can be modified to run Do you want us to change default seccomp profile? Should not this request to be addressed to Moby team? Honestly i can hardly imagine how we can change the docker virtualisation model from the moby codebase outside. |
I noticed that you do not use the |
@fweimer-rh github actions used moby "as is" without further tweaking This is why it would be more efficient to address the issue to the Moby team: https://github.com/moby/moby/issues |
@dsame The script doesn't show the repository being used, and some log output contains a Anyway, based on what you are saying, the images should inherit the fix in moby/moby#42680 in due course then? Thanks! |
@fweimer-rh yes, of course, the PR merged into the moby repo is to be deployed to the azure actions images |
Fedora 32 is EOL. Add Fedora 34 and 35. Disable security to work around actions/runner-images#3812 Remove rawhide, because it's broken.
Fedora 32 is EOL. Add Fedora 34 and 35. Disable security to work around actions/runner-images#3812 Remove rawhide, because it's broken.
Would it be possible to backport the aforementioned PR into the Azure Moby package that Github Runners use? |
GitHub Actions service has not yet updated its container seccomp policy to recognize a new clone3() syscall and OpenMandriva Cooker upgraded glibc which utilizes it. actions/runner-images#3812
Move all Fedora Rawhide CI builds to Nightly_Experimental, since they have been failing for a long time, because of the following error: Curl error (6): Couldn't resolve host name for \ https://mirrors.fedoraproject.org/metalink?repo=rawhide&arch=x86_64 \ [getaddrinfo() thread failed to start] See: https://www.mail-archive.com/[email protected]/msg169919.html actions/runner-images#3812 Signed-off-by: Lukasz Dorau <[email protected]>
Move all Fedora Rawhide CI builds to Nightly_Experimental, since they have been failing for a long time, because of the following error: Curl error (6): Couldn't resolve host name for \ https://mirrors.fedoraproject.org/metalink?repo=rawhide&arch=x86_64 \ [getaddrinfo() thread failed to start] See: https://www.mail-archive.com/[email protected]/msg169919.html actions/runner-images#3812
Same issue now on |
GitHub Actions service has not yet updated its container seccomp policy to recognize a new clone3() syscall and openSUSE Tumbleweed upgraded glibc to a version which utilizes it. actions/runner-images#3812
This CI builder bases on openSUSE Tumbleweed, and recently had its glibc updated. This led to new syscalls such as 'clone3' not being allowed through the security layer. Can be reverted after Github Actions updates their security policy. actions/runner-images#3812
Docker images with distributions which contain glibc-2.34 just doesn't work on GA. |
@vt-alt The problem is well known by now and there is no need to bug the developers anymore. A fix is in the pipeline for Docker. Your distro maintainer might include a temporary fix for Glibc like Ubuntu has done with Ubuntu Impish. But rolling distros tend to not do those things. It isn't their problem anyway. And if you want to run your GitHub Actions with a Ubuntu 20.04 or 21.04 base and a Docker image which isn't patched, there are some (temporary) solutions posted in the comments above and in the linked issues. |
I already submitted a patch for Fedora's Thanks, |
When target system upodated to glibc-2.34 (as for ALT Linux) it starts to use new syscall `clone3', which is not enabled in Docker seccomp filter, causing run failures. GA issue [1]. Disable Docker seccomp filtering since we are in throwable virtual environment anyway and don't need that protection. Link: actions/runner-images#3812 [1] Fixes: lkrg-org#121 Signed-off-by: Vitaly Chikunov <[email protected]>
When target system updated to glibc-2.34 (as for ALT Linux) it starts to use new syscall `clone3', which is not enabled in Docker seccomp filter, causing run failures. GA issue [1]. Disable Docker seccomp filtering since we are in throwable virtual environment anyway and don't need that protection. Link: actions/runner-images#3812 [1] Fixes: lkrg-org#121 Signed-off-by: Vitaly Chikunov <[email protected]>
When target system updated to glibc-2.34 (as for ALT Linux) it starts to use new syscall `clone3', which is not enabled in Docker seccomp filter, causing run failures. GA issue [1]. Disable Docker seccomp filtering since we are in throwable virtual environment anyway and don't need that protection. Link: actions/runner-images#3812 [1] Fixes: #121 Signed-off-by: Vitaly Chikunov <[email protected]>
It can't be disabled until a bug has been fixed upstream URL: actions/runner-images#3812 URL: https://bugzilla.redhat.com/show_bug.cgi?id=1988199 Signed-off-by: Samuli Seppänen <[email protected]>
GitHub Actions service has not yet updated its container seccomp policy to recognize a new clone3() syscall and openSUSE Tumbleweed upgraded glibc to a version which utilizes it. actions/runner-images#3812
It can't be disabled until a bug has been fixed upstream URL: actions/runner-images#3812 URL: https://bugzilla.redhat.com/show_bug.cgi?id=1988199 Signed-off-by: Samuli Seppänen <[email protected]>
The cross-architecture tests fail in glib2: Exec failed with: Failed to close file descriptor for child process (Operation not permitted) That's the 2-year-old GitHub bug <actions/runner-images#3812>. Some other projects which run ubuntu-latest reported that the bug is already fixed. We used ubuntu-20.04. ubuntu-latest is ubuntu-22.04. Try that.
.github/workflows/multiarch.yaml tests started to fail in glib2: Exec failed with: Failed to close file descriptor for child process (Operation not permitted) That's the 2-year-old GitHub bug <actions/runner-images#3812>. Some other projects which run ubuntu-latest reported that the bug is already fixed. We used ubuntu-20.04. ubuntu-latest is ubuntu-22.04 now. Try that.
When glibc-2.34 started to use clone3() syscall, seccomp policy became violated and glib2 fork+exec functions failed. This discrepancy was worked around with passing "--security-opt seccomp=unconfined" option to a container manager. Now when Microsoft fixed the policy in ubuntu-22.04 images (ubuntu-20.04 remains broken) and we moved to ubuntu-22.04, the workaround is not needed. This patch removes it. <actions/runner-images#3812>
Fedora 32 is EOL. Add Fedora 34 and 35. Disable security to work around actions/runner-images#3812 Remove rawhide, because it's broken.
Description
glibc 2.34 will try to use
clone3
if available to enable hardware-assisted security hardening on recent x86-64 CPUs. Presently this does not work in Azure DevOps and Github Actions because theclone3
system call is blocked by seccomp policy.This issue may have been introduced by a Moby update to a version that includes moby/moby#41889. Before that, the
ENOSYS
kludge added in opencontainers/runc#2750 should have prevent this failure.For actions that run
docker create
, it is possible to workaround this by specifying--security-opt seccomp=unconfined
, but no such option exists fordocker build
for some reason. (See moby/moby#34454.)Virtual environments affected
Image version and build link
Azure DevOps
https://dev.azure.com/dnceng/public/_build/results?buildId=1259364&view=logs&j=91749cbd-6d9d-54ec-5351-cfcf55a8b75c&t=8f482fb7-2227-41c9-9817-1c0d425d6aed&l=6
Github Actions
https://github.com/freeipa/freeipa-container/runs/3163951309
Is it regression?
No response
Expected behavior
clone3
should succeed or fail withENOSYS
. In the latter case, glibc will transparently use a fallback mechanismActual behavior
clone3
fails withEPERM
, causing thread creation to fail.Typical error messages for Fedora are:
Or with the Python reproducer below:
Repro steps
For testing purposes, Fedora rawhide (
registry.fedoraproject.org/fedora:rawhide
) already contains a glibc 2.34 snapshot which usesclone3
(with a fallback toclone
ifclone3
fails withENOSYS
). For example, this command should print123
:EDIT Command fixed to use the Fedora registry.
The text was updated successfully, but these errors were encountered: