-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Add openat2 and faccessat2 to default seccomp profile. #41353
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
Add openat2 and faccessat2 to default seccomp profile. #41353
Conversation
|
Oh, you need to edit or re-generate the JSON variant of the profile as well; After this is merged, could you also open a pull request in containerd to update the profile to match? https://github.com/containerd/containerd/tree/master/contrib/seccomp |
|
I wonder if libseccomp needs an update for this; I see only a single occurence of but many occurrences of |
|
Thanks, let me take a look. |
follow up to moby#41344 (comment) Signed-off-by: Jintao Zhang <[email protected]>
1c9bad2 to
b8988c8
Compare
@thaJeztah it seems like libseccomp has been updated (release/2.4) seccomp/libseccomp@b3206ad |
Opened PR containerd/containerd#4481 |
Ah; yes, I see they switched to a different approach for "master" and the 2.5 branch, and now use a csv; seccomp/libseccomp@f5b3166 Master (and 2.5 branch) already had the |
|
Looking at that last link; should we add |
|
Yes, I missed it. |
Signed-off-by: Jintao Zhang <[email protected]>
thaJeztah
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Hmmm
|
|
Ignoring the ppc64le stage, which is unrelated |
Since glibc 2.33, the faccessat() function tries the faccessat2 system call first and falls back to the faccessat system call on older kernels [1]. However, the seccomp profile provided by old Docker engines does not allow faccessat2 (fixed by [2][3]). As a result, the faccessat2 system call returns EPERM, and glibc returns an error in this case. Using a patched glibc to workaround this issue. Note that the aforementioned glibc commit does not mean that glibc 2.33 building on new kernels does not work with old kernels. Instead, the __LINUX_KERNEL_VERSION macro is 0 by default to achieve best-effort compatibility with various kernel versions. [1] https://sourceware.org/git/?p=glibc.git;a=patch;h=3d3ab573a5f3071992cbc4f57d50d1d29d55bde2 [2] moby/moby#41353 [3] moby/moby#41381
Since glibc 2.33, the faccessat() function tries the faccessat2 system call first and falls back to the faccessat system call on older kernels [1]. However, the seccomp profile provided by old Docker engines does not allow faccessat2 (fixed by [2][3]). As a result, the faccessat2 system call returns EPERM, and glibc returns an error in this case. Using a patched glibc to workaround this issue. Note that the aforementioned glibc commit does not mean that glibc 2.33 building on new kernels does not work with old kernels. Instead, the __LINUX_KERNEL_VERSION macro is 0 by default to achieve best-effort compatibility with various kernel versions. [1] https://sourceware.org/git/?p=glibc.git;a=patch;h=3d3ab573a5f3071992cbc4f57d50d1d29d55bde2 [2] moby/moby#41353 [3] moby/moby#41381
Since glibc 2.33, the faccessat() function tries the faccessat2 system call first and falls back to the faccessat system call on older kernels [1]. However, the seccomp profile provided by old Docker engines does not allow faccessat2 (fixed by [2][3]). As a result, the faccessat2 system call returns EPERM, and glibc returns an error in this case. Using a patched glibc to workaround this issue. Note that the aforementioned glibc commit does not mean that glibc 2.33 building on new kernels does not work with old kernels. Instead, the __LINUX_KERNEL_VERSION macro is 0 by default to achieve best-effort compatibility with various kernel versions. [1] https://sourceware.org/git/?p=glibc.git;a=patch;h=3d3ab573a5f3071992cbc4f57d50d1d29d55bde2 [2] moby/moby#41353 [3] moby/moby#41381
Since glibc 2.33, the faccessat() function tries the faccessat2 system call first and falls back to the faccessat system call on older kernels [1]. However, the seccomp profile provided by old Docker engines does not allow faccessat2 (fixed by [2][3]). As a result, the faccessat2 system call returns EPERM, and glibc returns an error in this case. Using a patched glibc to workaround this issue. Note that the aforementioned glibc commit does not mean that glibc 2.33 building on new kernels does not work with old kernels. Instead, the __LINUX_KERNEL_VERSION macro is 0 by default to achieve best-effort compatibility with various kernel versions. [1] https://sourceware.org/git/?p=glibc.git;a=patch;h=3d3ab573a5f3071992cbc4f57d50d1d29d55bde2 [2] moby/moby#41353 [3] moby/moby#41381
Since glibc 2.33, the faccessat() function tries the faccessat2 system call first and falls back to the faccessat system call on older kernels [1]. However, the seccomp profile provided by old Docker engines does not allow faccessat2 (fixed by [2][3]). As a result, the faccessat2 system call returns EPERM, and glibc returns an error in this case. Using a patched glibc to workaround this issue. Note that the aforementioned glibc commit does not mean that glibc 2.33 building on new kernels does not work with old kernels. Instead, the __LINUX_KERNEL_VERSION macro is 0 by default to achieve best-effort compatibility with various kernel versions. [1] https://sourceware.org/git/?p=glibc.git;a=patch;h=3d3ab573a5f3071992cbc4f57d50d1d29d55bde2 [2] moby/moby#41353 [3] moby/moby#41381
Since glibc 2.33, the faccessat() function tries the faccessat2 system call first and falls back to the faccessat system call on older kernels [1]. However, the seccomp profile provided by old Docker engines does not allow faccessat2 (fixed by [2][3]). As a result, the faccessat2 system call returns EPERM, and glibc returns an error in this case. Using a patched glibc to workaround this issue. Note that the aforementioned glibc commit does not mean that glibc 2.33 building on new kernels does not work with old kernels. Instead, the __LINUX_KERNEL_VERSION macro is 0 by default to achieve best-effort compatibility with various kernel versions. [1] https://sourceware.org/git/?p=glibc.git;a=patch;h=3d3ab573a5f3071992cbc4f57d50d1d29d55bde2 [2] moby/moby#41353 [3] moby/moby#41381
Since glibc 2.33, the faccessat() function tries the faccessat2 system call first and falls back to the faccessat system call on older kernels [1]. However, the seccomp profile provided by old Docker engines does not allow faccessat2 (fixed by [2][3]). As a result, the faccessat2 system call returns EPERM, and glibc returns an error in this case. Using a patched glibc to workaround this issue. Note that the aforementioned glibc commit does not mean that glibc 2.33 building on new kernels does not work with old kernels. Instead, the __LINUX_KERNEL_VERSION macro is 0 by default to achieve best-effort compatibility with various kernel versions. [1] https://sourceware.org/git/?p=glibc.git;a=patch;h=3d3ab573a5f3071992cbc4f57d50d1d29d55bde2 [2] moby/moby#41353 [3] moby/moby#41381
Since glibc 2.33, the faccessat() function tries the faccessat2 system call first and falls back to the faccessat system call on older kernels [1]. However, the seccomp profile provided by old Docker engines does not allow faccessat2 (fixed by [2][3]). As a result, the faccessat2 system call returns EPERM, and glibc returns an error in this case. Using a patched glibc to workaround this issue. Note that the aforementioned glibc commit does not mean that glibc 2.33 building on new kernels does not work with old kernels. Instead, the __LINUX_KERNEL_VERSION macro is 0 by default to achieve best-effort compatibility with various kernel versions. [1] https://sourceware.org/git/?p=glibc.git;a=patch;h=3d3ab573a5f3071992cbc4f57d50d1d29d55bde2 [2] moby/moby#41353 [3] moby/moby#41381
Fixes moby#41704 The latest released versions of the static binaries (20.10.3) are still unable to use faccessat2 with musl-1.2.2 even though this was addressed in moby#41353 and related issues. The underlying cause seems to be that the build system here still uses the default version of libseccomp shipped with buster. An updated version is available in buster backports: https://packages.debian.org/buster-backports/libseccomp-dev Signed-off-by: Jeremy Huntwork <[email protected]>
Fixes moby#41704 The latest released versions of the static binaries (20.10.3) are still unable to use faccessat2 with musl-1.2.2 even though this was addressed in moby#41353 and related issues. The underlying cause seems to be that the build system here still uses the default version of libseccomp shipped with buster. An updated version is available in buster backports: https://packages.debian.org/buster-backports/libseccomp-dev Signed-off-by: Jeremy Huntwork <[email protected]> (cherry picked from commit 1600e85) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Since glibc 2.33, the faccessat() function tries the faccessat2 system call first and falls back to the faccessat system call on older kernels [1]. However, the seccomp profile provided by old Docker engines does not allow faccessat2 (fixed by [2][3]). As a result, the faccessat2 system call returns EPERM, and glibc returns an error in this case. Using a patched glibc to workaround this issue. Note that the aforementioned glibc commit does not mean that glibc 2.33 building on new kernels does not work with old kernels. Instead, the __LINUX_KERNEL_VERSION macro is 0 by default to achieve best-effort compatibility with various kernel versions. [1] https://sourceware.org/git/?p=glibc.git;a=patch;h=3d3ab573a5f3071992cbc4f57d50d1d29d55bde2 [2] moby/moby#41353 [3] moby/moby#41381
Since glibc 2.33, the faccessat() function tries the faccessat2 system call first and falls back to the faccessat system call on older kernels [1]. However, the seccomp profile provided by old Docker engines does not allow faccessat2 (fixed by [2][3]). As a result, the faccessat2 system call returns EPERM, and glibc returns an error in this case. Using a patched glibc to workaround this issue. Note that the aforementioned glibc commit does not mean that glibc 2.33 building on new kernels does not work with old kernels. Instead, the __LINUX_KERNEL_VERSION macro is 0 by default to achieve best-effort compatibility with various kernel versions. [1] https://sourceware.org/git/?p=glibc.git;a=patch;h=3d3ab573a5f3071992cbc4f57d50d1d29d55bde2 [2] moby/moby#41353 [3] moby/moby#41381
Since glibc 2.33, the faccessat() function tries the faccessat2 system call first and falls back to the faccessat system call on older kernels [1]. However, the seccomp profile provided by old Docker engines does not allow faccessat2 (fixed by [2][3]). As a result, the faccessat2 system call returns EPERM, and glibc returns an error in this case. Using a patched glibc to workaround this issue. Note that the aforementioned glibc commit does not mean that glibc 2.33 building on new kernels does not work with old kernels. Instead, the __LINUX_KERNEL_VERSION macro is 0 by default to achieve best-effort compatibility with various kernel versions. [1] https://sourceware.org/git/?p=glibc.git;a=patch;h=3d3ab573a5f3071992cbc4f57d50d1d29d55bde2 [2] moby/moby#41353 [3] moby/moby#41381
Since glibc 2.33, the faccessat() function tries the faccessat2 system call first and falls back to the faccessat system call on older kernels [1]. However, the seccomp profile provided by old Docker engines does not allow faccessat2 (fixed by [2][3]). As a result, the faccessat2 system call returns EPERM, and glibc returns an error in this case. Using a patched glibc to workaround this issue. Note that the aforementioned glibc commit does not mean that glibc 2.33 building on new kernels does not work with old kernels. Instead, the __LINUX_KERNEL_VERSION macro is 0 by default to achieve best-effort compatibility with various kernel versions. [1] https://sourceware.org/git/?p=glibc.git;a=patch;h=3d3ab573a5f3071992cbc4f57d50d1d29d55bde2 [2] moby/moby#41353 [3] moby/moby#41381
Since glibc 2.33, the faccessat() function tries the faccessat2 system call first and falls back to the faccessat system call on older kernels [1]. However, the seccomp profile provided by old Docker engines does not allow faccessat2 (fixed by [2][3]). As a result, the faccessat2 system call returns EPERM, and glibc returns an error in this case. Using a patched glibc to workaround this issue. Note that the aforementioned glibc commit does not mean that glibc 2.33 building on new kernels does not work with old kernels. Instead, the __LINUX_KERNEL_VERSION macro is 0 by default to achieve best-effort compatibility with various kernel versions. [1] https://sourceware.org/git/?p=glibc.git;a=patch;h=3d3ab573a5f3071992cbc4f57d50d1d29d55bde2 [2] moby/moby#41353 [3] moby/moby#41381
Since glibc 2.33, the faccessat() function tries the faccessat2 system call first and falls back to the faccessat system call on older kernels [1]. However, the seccomp profile provided by old Docker engines does not allow faccessat2 (fixed by [2][3]). As a result, the faccessat2 system call returns EPERM, and glibc returns an error in this case. Using a patched glibc to workaround this issue. Note that the aforementioned glibc commit does not mean that glibc 2.33 building on new kernels does not work with old kernels. Instead, the __LINUX_KERNEL_VERSION macro is 0 by default to achieve best-effort compatibility with various kernel versions. [1] https://sourceware.org/git/?p=glibc.git;a=patch;h=3d3ab573a5f3071992cbc4f57d50d1d29d55bde2 [2] moby/moby#41353 [3] moby/moby#41381
Since glibc 2.33, the faccessat() function tries the faccessat2 system call first and falls back to the faccessat system call on older kernels [1]. However, the seccomp profile provided by old Docker engines does not allow faccessat2 (fixed by [2][3]). As a result, the faccessat2 system call returns EPERM, and glibc returns an error in this case. Using a patched glibc to workaround this issue. Note that the aforementioned glibc commit does not mean that glibc 2.33 building on new kernels does not work with old kernels. Instead, the __LINUX_KERNEL_VERSION macro is 0 by default to achieve best-effort compatibility with various kernel versions. [1] https://sourceware.org/git/?p=glibc.git;a=patch;h=3d3ab573a5f3071992cbc4f57d50d1d29d55bde2 [2] moby/moby#41353 [3] moby/moby#41381
Since glibc 2.33, the faccessat() function tries the faccessat2 system call first and falls back to the faccessat system call on older kernels [1]. However, the seccomp profile provided by old Docker engines does not allow faccessat2 (fixed by [2][3]). As a result, the faccessat2 system call returns EPERM, and glibc returns an error in this case. Using a patched glibc to workaround this issue. Note that the aforementioned glibc commit does not mean that glibc 2.33 building on new kernels does not work with old kernels. Instead, the __LINUX_KERNEL_VERSION macro is 0 by default to achieve best-effort compatibility with various kernel versions. [1] https://sourceware.org/git/?p=glibc.git;a=patch;h=3d3ab573a5f3071992cbc4f57d50d1d29d55bde2 [2] moby/moby#41353 [3] moby/moby#41381
Since glibc 2.33, the faccessat() function tries the faccessat2 system call first and falls back to the faccessat system call on older kernels [1]. However, the seccomp profile provided by old Docker engines does not allow faccessat2 (fixed by [2][3]). As a result, the faccessat2 system call returns EPERM, and glibc returns an error in this case. Using a patched glibc to workaround this issue. Note that the aforementioned glibc commit does not mean that glibc 2.33 building on new kernels does not work with old kernels. Instead, the __LINUX_KERNEL_VERSION macro is 0 by default to achieve best-effort compatibility with various kernel versions. [1] https://sourceware.org/git/?p=glibc.git;a=patch;h=3d3ab573a5f3071992cbc4f57d50d1d29d55bde2 [2] moby/moby#41353 [3] moby/moby#41381
Fixes moby#41704 The latest released versions of the static binaries (20.10.3) are still unable to use faccessat2 with musl-1.2.2 even though this was addressed in moby#41353 and related issues. The underlying cause seems to be that the build system here still uses the default version of libseccomp shipped with buster. An updated version is available in buster backports: https://packages.debian.org/buster-backports/libseccomp-dev Signed-off-by: Jeremy Huntwork <[email protected]> (cherry picked from commit 1600e85) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Fixes moby#41704 The latest released versions of the static binaries (20.10.3) are still unable to use faccessat2 with musl-1.2.2 even though this was addressed in moby#41353 and related issues. The underlying cause seems to be that the build system here still uses the default version of libseccomp shipped with buster. An updated version is available in buster backports: https://packages.debian.org/buster-backports/libseccomp-dev Signed-off-by: Jeremy Huntwork <[email protected]> (cherry picked from commit 1600e85) Signed-off-by: Sebastiaan van Stijn <[email protected]>
follow up to #41344 (comment)
Note:
openat2()first appeared in Linux 5.6. And Glibc does not provide a wrapper for this system call; call it usingsyscall(2).ref: https://man7.org/linux/man-pages/man2/openat2.2.html