interplane.Get Omega
Read in your language

atlas

aien-dev/atlas

Brought by drakestapleton

branch master Branches Tags History

atlas / AUDIT_SCOPE.md

126 lines · 7548 bytes Raw Blame History Source

Audit scope

Written for an outside, independent security audit. Revision described: c624eb489275bc046cec3686af3010b8dcc7eec0 on master, 2026-10-26. Everything below is taken from the repository's own files at that revision; items marked NOT_RUN were not executed while writing this document.

What this repository is

Atlas is the first software in the AIEN boot chain: a 1,480-byte AArch64 binary, atlas.bin (SHA-256 f7802501b410a0c19eff7b8fca8865c9ba9c96bfa4f8065ca8f508b67748b9a5), that checks the next boot stage against a pinned SHA-256 digest (e1d89bb1e0854ebaccd2be5c756c8a2ff8c5ecc8c0f90b4abd461fb7bf98374c), hands control to it, and refuses and halts if the check fails. Its source is atlas.s. The repository also holds its audit artifacts, machine_contract.json (CONTRACT-QEMU-VIRT-AARCH64-M1), the Milestone 1 receipt qualification_receipt.json, a 256-byte test payload physics-0.bin (source physics_0.s), and a C and POSIX shell gate runner. Status: QEMU qualified, native run pending, quiet (the seed and its gate runner last changed on 2026-09-26). Licence Apache 2.0.

What to review, in priority order

  1. atlas.s and atlas.bin. The seed: masks interrupts, sets the stack at 0x401FC000, writes a boot descriptor at 0x401FE000, hashes the payload, compares with the pinned digest, and either branches to 0x40200000 (ldr x19, =0x40200000; br x19) or halts. Check the compare is over the full digest, that the hashed range equals the executed range, and that every failure path reaches the halt.
  2. sha256_clean.s and sha256_clean.c. The SHA-256 used by the seed and by the host tools. test_sha256_kat.c runs NIST FIPS 180-4 known-answer tests against the C implementation.
  3. atlas.memory-map, atlas.control-flow, atlas.audit, atlas.decode, atlas.manifest, machine_contract.json. Static descriptions that Seam 1 checks against the binary (301 instructions, 69 rodata words, 0 discrepancy; 8 KiB guard gap between stack and descriptor). Check they describe the binary, not each other.
  4. tools/m1tool.c (1,150 lines). Host tool: sha256, hexfield, bytes, audit-verify, gen-audit, mutate-sweep, mutate-adv, qemu-run, qemu-matrix. It parses the audit and decode text files, forks aarch64-linux-gnu-objdump (in gen-audit) and qemu-system-aarch64 -M virt (in qemu-run and qemu-matrix) with execvp/execlp, kills QEMU after a timeout (default 1500 ms), and writes mutated payloads into a mkdtemp directory. Check parser bounds, argument handling and temporary file safety.
  5. run_m1_gates.sh. Builds the host tools with gcc -O2 ... -Werror, runs the KAT, Seam 1 and Seam 2 under set -eu. Note that the final summary prints fixed [PASSED] lines; it relies on set -e stopping the script when any earlier step fails. With --write-receipt it overwrites qualification_receipt.json.
  6. scripts/test-host-security.sh. Offline host-only controls: builds m1tool with AddressSanitizer and UndefinedBehaviorSanitizer, feeds malformed decode offsets, checks that an artifact path is not interpreted by a shell, that a symlink at a predictable temp name is not clobbered, and that a failing KAT stops the runner with its exit status.
  7. scripts/check-no-python.sh. Fails on any tracked Python file or Python shebang.

There is no .github/workflows/ directory. AGENTS.md: "There is no hosted CI. Testing runs on the project's own machines; GitHub-hosted test workflows were removed on purpose."

Trust boundaries

Threat model summary

Build from source at a pin

Requirements (AGENTS.md): a POSIX shell, gcc, git, and qemu-system-aarch64 (machine virt) for the execution seam. No Python and no package manager. gen-audit also needs aarch64-linux-gnu-objdump. Toolchain versions are not pinned in the repository.

The host tools are built by the gate runner:

gcc -O2 -std=c11 -Wall -Wextra -Werror -o tools/m1tool tools/m1tool.c sha256_clean.c
gcc -O2 -o test_sha256_kat test_sha256_kat.c sha256_clean.c

The command that assembles atlas.s into atlas.bin is unknown from the repository; the committed atlas.bin is the canonical artifact, identified by atlas.sha256.

Run every test

NOT_RUN while writing this document. In order:

sh scripts/check-no-python.sh        # no tracked Python
sh scripts/test-host-security.sh     # host-only sanitizer and fail-closed controls, no QEMU
./run_m1_gates.sh                    # KAT, Seam 1, Seam 2 (needs qemu-system-aarch64)

Expected summary lines: `ATLAS-HOST-SECURITY PASS (sanitizer bounds, argv, private temp, failed KAT)from the host-security script, andOverall Result: MILESTONE 1 QUALIFIED (QEMU)` followed by the eight gate names from run_m1_gates.sh. Do not pass --write-receipt: it overwrites the committed receipt and is reserved for an approved requalification. run_milestone1_gates.sh is the same runner under its old name. Native hardware gates: NOT_RUN, no runner exists.

Known limitations and NOT_RUN

Dependencies and provenance

Evidence

qualification_receipt.json is the Milestone 1 receipt. history/alpha/ holds pre-rename artifacts. AGENTS.md: historical evidence is not edited to match today's standards; do not modify the receipt, the seed or its pins without an explicit maintainer decision. Receipts are append-only.