Skip to content

v3.0.9

  • v3.0.9
  • 9bf7a03
  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
  • Choose a tag to compare

  • v3.0.9
  • 9bf7a03
  • Choose a tag to compare

  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
@that-guy-wade that-guy-wade tagged this 16 Nov 21:42
* fix(sandbox): isolate each task in a run from the run's other tasks

A run's tasks share one sandbox container and, until now, one uid. Any task
could read the other tasks' request logs, the run-wide problem and session
files (whose session ids are the only credential for an episode), files the
others left in /tmp, and their /proc entries.

With --isolate-tasks, which build_sandbox_command now always passes:
- the executor runs as root with only CHOWN, SETUID, SETGID, KILL and
  DAC_READ_SEARCH, and each task's child drops to its own random uid before
  the agent loads; agent code never runs as root
- each task's only writable place is a private directory (TMPDIR) owned
  root:<task gid> 0770; its request log and usage stats live there
- evaluator mounts move to /run/oro/{logs,output} under a root-only
  directory; shared /tmp and /dev/shm are root-owned 0711
- the executor copies each running task's usage lines to the run's shared
  sidecar every 2 s, so usage survives the container being killed mid-task,
  and reads task-written files without following links
- the run refuses to start without root instead of running unisolated

Tasks take their session from problem_data, so ORO_ENVIRONMENT_SESSIONS_FILE
is no longer passed. Integration tests now also run when the sandbox
executor or command builder changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(sandbox): never unpickle what a task sends back to the root executor

The executor now runs as root, and it read each task's result from a
multiprocessing.Queue, which unpickles. An agent could return an object
whose __reduce__ calls a builtin, or write its own pickle to the queue's
pipe, and have that code run as root.

The child now sends [status, data] as JSON bytes on a one-way Pipe, and the
parent reads it with recv_bytes (capped at MAX_SANDBOX_OUTPUT_BYTES) and
json.loads. A non-JSON result fails the task; a malformed, oversized or
partial message reads as no result. The parent closes its copy of the write
end, so a child that dies reads as EOF.

Tests: both attacks (a returned pickle bomb and raw pickle bytes on the
channel) leave no trace in the parent; the returned-object case fails
against the previous Queue code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(miner-guide): keep the sandbox paragraph as it was

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Assets 2
Loading