-
Notifications
You must be signed in to change notification settings - Fork 239
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
Allow loading more than one seccomp program #459
Conversation
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. |
This looks good to me. |
Thanks, I'll give this a try on ye olde Ubuntu VM and make sure it works there. |
5a5815f
to
33f2192
Compare
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. |
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>
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>
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
Changes in 8dff615: synced |
tests/test-seccomp.py
Outdated
|
||
if completed.returncode != 0: | ||
raise unittest.SkipTest( | ||
'cannot run bwrap (does it need to be setuid?' |
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.
'cannot run bwrap (does it need to be setuid?' | |
'cannot run bwrap (does it need to be setuid?)' |
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)
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)
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
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)
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