-
Notifications
You must be signed in to change notification settings - Fork 257
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
Landlock support #871
Labels
Comments
This was referenced Aug 28, 2021
Xyene
added a commit
to Xyene/judge
that referenced
this issue
Aug 28, 2021
We won't be able to support these with Landlock, but it looks like no runtime we currently support require them. Ref DMOJ#871.
Xyene
added a commit
to Xyene/judge
that referenced
this issue
Aug 28, 2021
We won't be able to support these with Landlock, but it looks like no runtime we currently support require them. Ref DMOJ#871.
Xyene
added a commit
to Xyene/judge
that referenced
this issue
Aug 28, 2021
We won't be able to support these with Landlock, but it looks like no runtime we currently support require them. Ref DMOJ#871.
Xyene
added a commit
that referenced
this issue
Aug 28, 2021
We won't be able to support these with Landlock, but it looks like no runtime we currently support require them. Ref #871.
Riolku
added a commit
to Riolku/judge-server
that referenced
this issue
Aug 30, 2021
Riolku
added a commit
to Riolku/judge-server
that referenced
this issue
Aug 30, 2021
Riolku
added a commit
to Riolku/judge-server
that referenced
this issue
Aug 30, 2021
Riolku
added a commit
to Riolku/judge-server
that referenced
this issue
Sep 5, 2021
Riolku
added a commit
to Riolku/judge-server
that referenced
this issue
Sep 5, 2021
Riolku
added a commit
to Riolku/judge-server
that referenced
this issue
Sep 5, 2021
Riolku
added a commit
to Riolku/judge-server
that referenced
this issue
Sep 5, 2021
Riolku
added a commit
to Riolku/judge-server
that referenced
this issue
Sep 5, 2021
Riolku
added a commit
to Riolku/judge-server
that referenced
this issue
Sep 5, 2021
Riolku
added a commit
to Riolku/judge-server
that referenced
this issue
Sep 5, 2021
Riolku
added a commit
to Riolku/judge-server
that referenced
this issue
Sep 5, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Linux 5.13 introduced a new security subsystem, Landlock, that we can make use of in cptbox for filesystem sandboxing.
Currently, cptbox in the standard configuration makes use of seccomp to whitelist syscalls, and trap into ptrace for syscalls that need either sanitization or unconditional failure with an error code (e.g.,
socket
). The latter can already be done by seccomp; we just don't do so currently out of laziness. Landlock would allow us to drop ptrace entirely, and let the kernel do more of the heavy lifting. A ptrace-less implementation would also remove the need for multiprocessed programs to take a performance hit.A non-exhaustive checklist of things that need to happen:
BASE_FILESYSTEM
is currently defined asA Landlock-friendly version could look something like
These objects should support composition:
should be equivalent to
DMOJ_USE_SECCOMP=no
, and clean up any fallback paths. We do not want to maintain all three {ptrace only, ptrace + seccomp, seccomp + landlock} backends, given we'd only be running the latter in production.DMOJ_USE_LANDLOCK
toggle. We'd probably want to default this tono
for now.The text was updated successfully, but these errors were encountered: