Skip to content

Whitelist statx syscall#36417

Merged
thaJeztah merged 1 commit intomoby:masterfrom
NobodyOnSE:patch-2
Mar 6, 2018
Merged

Whitelist statx syscall#36417
thaJeztah merged 1 commit intomoby:masterfrom
NobodyOnSE:patch-2

Conversation

@NobodyOnSE
Copy link
Copy Markdown
Contributor

@NobodyOnSE NobodyOnSE commented Feb 26, 2018

Signed-off-by: NobodyOnSE ich@sektor.selfip.com

Edited via github's webeditor, so the signoff was done manually, I hope that is enough.

The need for this addition is explained in this SO post. In short: building a Qt 5.10.1 application fails in moc because it uses statx to find includes.

- What I did
Added statx to whitelist of allowed syscalls.

- How I did it
Added it in the default.json for seccomp.

- How to verify it
Try to use statx and don't get an EPERM anymore on non-privileged containers.

- Description for the changelog
Whitelist statx syscall

- A picture of a cute animal (not mandatory but encouraged)

Hedgehog with christmas hat

Copy link
Copy Markdown
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is autogenerated file.

Please edit seccomp_dewfault.go and run go generate

@NobodyOnSE
Copy link
Copy Markdown
Contributor Author

@AkihiroSuda I hope that worked. I am no go programmer. I am not used to having an autogenerated file in version control.

@thaJeztah
Copy link
Copy Markdown
Member

ping @justincormack @n4ss PTAL

@justincormack
Copy link
Copy Markdown
Contributor

Thats fine but note that you will need to install libseccomp-2.3.3 on the host for this to work, as I think that is the first version with statx support.

@thaJeztah
Copy link
Copy Markdown
Member

Thats fine but note that you will need to install libseccomp-2.3.3 on the host for this to work, as I think that is the first version with statx support.

What would be the effect when running on an older libseccomp? will it just ignore this configuration, and continue working as currently?

@n4ss
Copy link
Copy Markdown

n4ss commented Feb 28, 2018

LGTM!

@NobodyOnSE
Copy link
Copy Markdown
Contributor Author

@thaJeztah I tried to emulate this case by whitelisting the fake syscall nonsense and got no error message. The container started as intended. Furthermore, the seccomp filter still seems to work as I got EPERM on a non whitelisted syscall.

@thaJeztah
Copy link
Copy Markdown
Member

I tried to emulate this case by whitelisting the fake syscall nonsense and got no error message. The container started as intended. Furthermore, the seccomp filter still seems to work as I got EPERM on a non whitelisted syscall.

Thanks!

Changes LGTM; could you squash your commits, so that there's a single commit in this PR? While doing so, perhaps you could update the commit message to also mention that this requires newer versions of libseccomp, and will be ignored by older ones

Older seccomp versions will ignore this.

Signed-off-by: NobodyOnSE <ich@sektor.selfip.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 6, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@2f7a76a). Click here to learn what that means.
The diff coverage is 0%.

@@            Coverage Diff            @@
##             master   #36417   +/-   ##
=========================================
  Coverage          ?   34.65%           
=========================================
  Files             ?      613           
  Lines             ?    45400           
  Branches          ?        0           
=========================================
  Hits              ?    15732           
  Misses            ?    27607           
  Partials          ?     2061

@NobodyOnSE
Copy link
Copy Markdown
Contributor Author

could you squash your commits,

done

update the commit message to also mention that this requires newer versions of libseccomp, and will be ignored by older ones

done

Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@NobodyOnSE
Copy link
Copy Markdown
Contributor Author

@thaJeztah Is there an ETA or a planned release for this PR?

@thaJeztah thaJeztah merged commit f0694e9 into moby:master Mar 6, 2018
@thaJeztah
Copy link
Copy Markdown
Member

@NobodyOnSE it was opened after code-freeze for Docker 18.03, so currently it will be included in the release after that (18.04)

@thaJeztah
Copy link
Copy Markdown
Member

If you want to try a version with this patch, nightly builds should be available soon in the "nightly" channel (e.g. nightly builds for Ubuntu 16.04 https://download.docker.com/linux/ubuntu/dists/xenial/pool/nightly/amd64/)

thaJeztah added a commit to thaJeztah/containerd that referenced this pull request Mar 20, 2019
This whitelists the statx syscall; libseccomp-2.3.3 or up
is needed for this, older seccomp versions will ignore this.

Equivalent of moby/moby#36417

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah added a commit to thaJeztah/containerd that referenced this pull request Mar 20, 2019
This whitelists the statx syscall; libseccomp-2.3.3 or up
is needed for this, older seccomp versions will ignore this.

Equivalent of moby/moby#36417

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8f8fd3c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah added a commit to thaJeztah/containerd that referenced this pull request Mar 20, 2019
This whitelists the statx syscall; libseccomp-2.3.3 or up
is needed for this, older seccomp versions will ignore this.

Equivalent of moby/moby#36417

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8f8fd3c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
yan12125 added a commit to lxqt/qtermwidget that referenced this pull request Oct 14, 2019
Previously, moc calls fail with:

standard input:0: Note: No relevant classes found. No output generated.

Some relevant discussions suggest that statx functionality is
needed [1], which is available with docker 18.04+ and libseccomp 2.3.3+
[2]. Ubuntu 16.04 do have libseccomp 2.4.1 [3]. Maybe Travis CI builders
are just not updated.

[1] Martchus/PKGBUILDs#54
[2] moby/moby#36417
[3] https://repology.org/project/libseccomp/versions
yan12125 added a commit to lxqt/qtermwidget that referenced this pull request Oct 14, 2019
1. Adapted to arch-travis upstream changes [1]

2. Use Bionic (Ubuntu 18.04) on Travis CI

Previously, moc calls fail with:

standard input:0: Note: No relevant classes found. No output generated.

Some relevant discussions suggest that statx functionality is
needed [2], which is available with docker 18.04+ and libseccomp 2.3.3+
[3]. Ubuntu 16.04 do have libseccomp 2.4.1 [4]. Maybe Travis CI builders
are just not updated.

[1] mikkeloscar/arch-travis#65
[2] Martchus/PKGBUILDs#54
[3] moby/moby#36417
[4] https://repology.org/project/libseccomp/versions
agaida pushed a commit to lxqt/qtermwidget that referenced this pull request Oct 21, 2019
1. Adapted to arch-travis upstream changes [1]

2. Use Bionic (Ubuntu 18.04) on Travis CI

Previously, moc calls fail with:

standard input:0: Note: No relevant classes found. No output generated.

Some relevant discussions suggest that statx functionality is
needed [2], which is available with docker 18.04+ and libseccomp 2.3.3+
[3]. Ubuntu 16.04 do have libseccomp 2.4.1 [4]. Maybe Travis CI builders
are just not updated.

[1] mikkeloscar/arch-travis#65
[2] Martchus/PKGBUILDs#54
[3] moby/moby#36417
[4] https://repology.org/project/libseccomp/versions
rhaschke added a commit to ubi-agni/moveit that referenced this pull request Jul 21, 2020
rhaschke added a commit to moveit/moveit that referenced this pull request Jul 21, 2020
rhaschke added a commit to moveit/moveit that referenced this pull request Aug 13, 2020
rhaschke added a commit to moveit/moveit that referenced this pull request Aug 13, 2020
olbat added a commit to olbat/dockerfiles that referenced this pull request Oct 10, 2020
Fixes issues #40 as recent versions of Docker are including
moby/moby#36417.
olbat added a commit to olbat/dockerfiles that referenced this pull request Oct 10, 2020
Fixes issues #40 as recent versions of Docker are including
moby/moby#36417.
olbat added a commit to olbat/dockerfiles that referenced this pull request Oct 11, 2020
Fixes issues #40 as recent versions of Docker are including
moby/moby#36417.
inventor2525 pushed a commit to inventor2525/qtermwidget that referenced this pull request May 14, 2024
1. Adapted to arch-travis upstream changes [1]

2. Use Bionic (Ubuntu 18.04) on Travis CI

Previously, moc calls fail with:

standard input:0: Note: No relevant classes found. No output generated.

Some relevant discussions suggest that statx functionality is
needed [2], which is available with docker 18.04+ and libseccomp 2.3.3+
[3]. Ubuntu 16.04 do have libseccomp 2.4.1 [4]. Maybe Travis CI builders
are just not updated.

[1] mikkeloscar/arch-travis#65
[2] Martchus/PKGBUILDs#54
[3] moby/moby#36417
[4] https://repology.org/project/libseccomp/versions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants