fix(runner): load the seccomp policy on amd64 and make the A16 bombs deterministic

This commit is contained in:
shira committed 2026-10-11 09:44:45 +03:00
1 parent e858280d91
commit 1ebd23693e
8 files changed
+68 -24

No files matched your search

+2 -2
View File
@@ -607,8 +607,8 @@ Then `test-sandbox` runs the A16 suite (see below).
| files_and_secrets | `/etc/passwd`, `/etc/shadow`, `/run/secrets` and the API token, runner files, `/proc`, `/sys`, `/dev/mem`, environment variables with `RUNNER`, `TOKEN`, or `SECRET`, writes to the root, the source, and `/out` | nothing is visible or writable except `/tmp` |
| privileges | setuid, setgid, chown to root, raising an rlimit | refused; uid and gid are not 0 |
| escape | ptrace, mounting a fresh procfs, unsharing a user namespace | the process is killed by seccomp (SIGSYS, `runtime_error`) |
| processes | fork bomb, and a thread bomb in Go | the cgroup process limit (`runtime_error`, limit `processes`) |
| memory | unbounded allocation | the cgroup memory limit (`memory_limit_exceeded`) |
| processes | fork bomb, and a thread bomb in Go (256 goroutines blocked in system calls, so the stacks stay far below the memory limit) | the cgroup process limit (`runtime_error`, limit `processes`) |
| memory | unbounded allocation, and in Go unbounded goroutines parked on a channel (no new threads) | the cgroup memory limit (`memory_limit_exceeded`) |
| disk | one large file and filling `/tmp` | refused by the file size limit and the tmpfs size |
| output | endless output | the output limit (`output_limit_exceeded`) |
| timeout | a busy loop that ignores signals, a sleep, a detached daemon in its own session | the CPU limit, the wall-clock limit; the daemon dies with the PID namespace |
+2 -2
View File
@@ -607,8 +607,8 @@ Vitest работает в Node без DOM, поэтому ограничени
| files_and_secrets | `/etc/passwd`, `/etc/shadow`, `/run/secrets` и токен API, файлы runner, `/proc`, `/sys`, `/dev/mem`, переменные окружения с `RUNNER`, `TOKEN` или `SECRET`, запись в корень, исходник и `/out` | ничего не видно и не записывается, кроме `/tmp` |
| privileges | setuid, setgid, chown на root, повышение rlimit | отказ, uid и gid не 0 |
| escape | ptrace, mount нового procfs, unshare user namespace | процесс убит seccomp (SIGSYS, `runtime_error`) |
| processes | fork bomb, на Go также thread bomb | лимит процессов cgroup (`runtime_error`, limit `processes`) |
| memory | бесконечное выделение памяти | лимит памяти cgroup (`memory_limit_exceeded`) |
| processes | fork bomb, на Go также thread bomb (256 горутин, заблокированных в системных вызовах, поэтому стеки остаются намного ниже лимита памяти) | лимит процессов cgroup (`runtime_error`, limit `processes`) |
| memory | бесконечное выделение памяти, на Go также бесконечные горутины, ожидающие на канале (без новых потоков) | лимит памяти cgroup (`memory_limit_exceeded`) |
| disk | один большой файл и заполнение `/tmp` | отказ лимита размера файла и размера tmpfs |
| output | бесконечный вывод | лимит вывода (`output_limit_exceeded`) |
| timeout | занятый цикл с игнорированием сигналов, сон, отсоединенный демон в своей сессии | лимит CPU, лимит стены; демон погибает вместе с PID namespace |