wai-quantum-service: sandboxed workers, IPv6 clients counted by /64, a per-client memory cap #464
Loading…
Reference in a new issue
No description provided.
Delete branch "wai/quantum-service-client-identity"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The fleet audit of the public job service found three ways past its limits. This closes them.
sandbox-exec: no network, no file writes, no program but itself (jobs::worker_profile). It reads its job on stdin and writes its result on stdout, so it needs none of them. A flaw in parsing a submitted circuit then reaches neither the host's files nor the network nor a shell. The exec chain stays one process (taskpolicy→nice→sandbox-exec→ worker), so memory polling, the energy read and the kill all work by PID as before.WAI_QSVC_SANDBOX=0turns it off for debugging.http::identity). Limits were counted per address, and a subscriber usually holds a whole /64, so rotating through it reset every per-client limit. An IPv4 address carried in IPv6 counts as itself.WAI_QSVC_CLIENT_GB, by default the per-job size). Three jobs from one client could hold the whole 96 GiB budget. Any client can still run its largest job.GET /v1and the MCP server publish the new limit.GET /v1also publishes how a client is counted and whether workers are sandboxed. The README and changelog document all three.Checked on the build host:
cargo test: 23 tests pass. New ones:a_client_holds_at_most_one_jobs_worth_of_memory_at_once;the_worker_sandbox_denies_files_network_and_processes(macOS): a file write, an outbound connection and a nested exec are each refused, while writing to the given pipe works;an_ipv6_client_is_its_64_and_ipv4_is_itself.cargo clippy --all-targets -- -D warningsis clean.smoke.sh: every check held.sandbox-exec -p (version 1)(allow default)(deny network*)(deny file-write*)…. A 22-qubit job completed with its energy read (3.3 J, on-chip counter).🤖 Generated with Claude Code