Allow loading more than one seccomp program#459
Merged
smcv merged 3 commits intocontainers:masterfrom Jan 31, 2022
Merged
Conversation
Collaborator
Author
|
Before merging this we should test it on a sufficiently ancient OS like Ubuntu 16.04 or Debian 9, to make sure we've avoided regressions like the ones triggered by fixing CVE-2021-41133 in Flatpak. |
Collaborator
|
This looks good to me. |
Collaborator
Author
|
Thanks, I'll give this a try on ye olde Ubuntu VM and make sure it works there. |
alexlarsson
approved these changes
Oct 14, 2021
5a5815f to
33f2192
Compare
Collaborator
Author
|
I've expanded the tests a bit. The actual implementation is still the same as @alexlarsson reviewed. I can't easily run the tests on anything older than Debian 10 and Ubuntu 20.04 because those are the oldest with python3-seccomp, but they pass on Debian 10. |
smcv
added a commit
to smcv/flatpak
that referenced
this pull request
Oct 21, 2021
This exercises various syscalls. It's heavily based on the one from <containers/bubblewrap#459>, but with the addition of a mode to output the numeric values of various expected errno codes, which are not otherwise available to shell scripts. Signed-off-by: Simon McVittie <smcv@collabora.com>
smcv
added a commit
to smcv/flatpak
that referenced
this pull request
Oct 21, 2021
This exercises various syscalls. It's heavily based on the one from <containers/bubblewrap#459>, but with the addition of a mode to output the numeric values of various expected errno codes, which are not otherwise available to shell scripts. Signed-off-by: Simon McVittie <smcv@collabora.com>
smcv
added a commit
to smcv/flatpak
that referenced
this pull request
Oct 25, 2021
This exercises various syscalls. It's heavily based on the one from <containers/bubblewrap#459>, but with the addition of a mode to output the numeric values of various expected errno codes, which are not otherwise available to shell scripts. Signed-off-by: Simon McVittie <smcv@collabora.com>
33f2192 to
8dff615
Compare
Collaborator
Author
|
Changes in 8dff615: synced |
mwleeds
reviewed
Oct 27, 2021
|
|
||
| if completed.returncode != 0: | ||
| raise unittest.SkipTest( | ||
| 'cannot run bwrap (does it need to be setuid?' |
Contributor
There was a problem hiding this comment.
Suggested change
| 'cannot run bwrap (does it need to be setuid?' | |
| 'cannot run bwrap (does it need to be setuid?)' |
smcv
added a commit
to smcv/flatpak
that referenced
this pull request
Jan 4, 2022
This exercises various syscalls. It's heavily based on the one from <containers/bubblewrap#459>, but with the addition of a mode to output the numeric values of various expected errno codes, which are not otherwise available to shell scripts. Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit 4ce2518)
smcv
added a commit
to smcv/flatpak
that referenced
this pull request
Jan 4, 2022
This exercises various syscalls. It's heavily based on the one from <containers/bubblewrap#459>, but with the addition of a mode to output the numeric values of various expected errno codes, which are not otherwise available to shell scripts. Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit 4ce2518)
mwleeds
pushed a commit
to flatpak/flatpak
that referenced
this pull request
Jan 4, 2022
This exercises various syscalls. It's heavily based on the one from <containers/bubblewrap#459>, but with the addition of a mode to output the numeric values of various expected errno codes, which are not otherwise available to shell scripts. Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit 4ce2518)
I'm about to add a third linked list, for seccomp programs, which would seem like too much duplication. Signed-off-by: Simon McVittie <smcv@collabora.com>
This will allow Flatpak to combine an allow-list (default-deny) of known system calls with a deny-list (default-allow) of system calls that are undesired. Resolves: containers#453 Signed-off-by: Simon McVittie <smcv@collabora.com>
Signed-off-by: Simon McVittie <smcv@collabora.com>
8dff615 to
3612534
Compare
Collaborator
Author
smcv
added a commit
to flatpak/flatpak
that referenced
this pull request
Mar 15, 2023
This exercises various syscalls. It's heavily based on the one from <containers/bubblewrap#459>, but with the addition of a mode to output the numeric values of various expected errno codes, which are not otherwise available to shell scripts. Signed-off-by: Simon McVittie <smcv@collabora.com> (cherry picked from commit 4ce2518) (cherry picked from commit f82e2a4)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generalize linked lists of LockFile and SetupOp
I'm about to add a third linked list, for seccomp programs, which would
seem like too much duplication.
Allow loading more than one seccomp program
This will allow Flatpak to combine an allow-list (default-deny) of
known system calls with a deny-list (default-allow) of system calls
that are undesired.
Resolves: RFE: a way to add more than one seccomp program #453
tests: Exercise seccomp filters