Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/seed/qualification/security673/README.md # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / seed / qualification / security673 / README.md` 197 lines ยท 14108 bytes Raw Blame History Rendered 1 # Seeded security qualification 2 3 This directory extends the existing native host compiler profile. It is not an alternative compiler, 4 authority service, store, or release path. Existing L408 compiler integration and Renda review remain. 5 6 ## Branch gate (#669) 7 8 Linux AArch64 only. Requires the existing seed reconstruction tools and GNU objdump 2.42 at 9 `/usr/bin/objdump`. From a fresh checkout at the reviewed source commit: 10 11 ```sh 12 sh seed/omega-from-seed.sh 13 seed/out/omc < seed/qualification/security673/gate669.om > build/gate669 14 readelf -h build/gate669 15 chmod +x build/gate669 16 build/gate669 > build/gate669.log 2> build/gate669.err 17 ``` 18 19 Run each command only if the previous command exits zero. In particular, a failed compilation 20 must never be made executable or run. Existing bootstrap shell is a retained seed prerequisite; 21 all new first-party qualification logic here is `.om`. `readelf` is an external format inspection, 22 not a correctness proof. The gate refuses an existing `build/security673-native` directory with91 23 instead of overwriting evidence. Preserve and rename that directory before a fresh run. 24 25 The gate rebuilds the actual compiler twice, compares both binaries, builds its helpers, and saves 26 every input, output and child stderr under that new directory. Standard output records exact child 27 commands, redirects, observed exits and expected exits. Gate success is0. Compiler refusal is24 28 with empty output; malformed oracle inputs are62; independently decoded target mismatch is61. 29 Unexpected exit, signal, timeout, malformed executable, or I/O failure fails the gate. Each directly 30 spawned child has a30-second deadline. This is not a sandbox, process-tree budget, or full resource 31 limit. These trusted synthetic tests do not spawn grandchildren. Run no untrusted workload through 32 this coordinator as if it provided isolation. 33 34 `build/gate669 0`, `build/gate669 1`, and `build/gate669 2`, each with fresh scratch, are intentional 35 negative controls for unexpected exit7, signal9, and a45-second child exceeding the30-second 36 deadline. Each must fail with99; the latter two log the raw low wait-status byte9. They never 37 print the success line. An unexpected gate crash is INVALID, never a passing negative control. 38 39 The actual compiler encoder `bdisp` (every B.cond/CBZ/CBNZ imm19 and every B/BL imm26 site) is 40 exposed by an exact-once source transform, not copied into a test implementation. Probe cases 0..7 41 accept the imm19 and imm26 extremes with the exact field, 8..15 refuse one word past each limit and 42 misaligned ends with error 24, 16..17 show the AArch64 output ceiling (error 14) that keeps every B/BL 43 inside its signed 128 MiB reach: 16 accepts a word at 8 MiB (the ceiling through omc `f4fa7951`; since 44 2026-11-11 the output grows in omc's arena, OMEGESE 9.6) and 17 refuses the first word at 128 MiB, so imm26 error 24 is a defence that no legal program reaches. The 45 forward branch-limit mutant is compiled from a distinct transformed source; its output is decoded 46 and rejected without execution. The range-free mutant (`branch-mutate 7`, then `0`) must answer 81 47 on exactly the four out-of-range cases. Long backward imm19 from source is not reachable through 48 `while`/`continue`: the loop-bound trap B.cs at the head reaches farther forward than the continue 49 reaches back, so the forward limit refuses first. Corpus mode 4 rows: N = 3, 16 and 262131 (the largest 50 accepted, continue 262142 words back) compile, decode with `branch-check 1` and exit 0; N = 262132, 51 262133 and 262134 are refused with 24. (Through omc `f4fa7951` the head's stubs sat after the function's 52 `ret`, 4 words farther: 262127 was the largest accepted and 262128 the first refused. Since 2026-11-11 the 53 stubs of a trap branch 512 KiB back sit in an island right after the loop, OMEGESE 9.6.) The range-free compiler accepts N = 262134 (continue 2^18 + 1 54 words back) and its B.AL decodes to the wrong target (61); that output is never executed. 55 56 GNU objdump is outside the seed compiler lineage. The `.om` checker consumes its selected text 57 format and rejects the enumerated malformed/missing/duplicate/wrong-target controls. It is not 58 a full disassembly grammar or authentication of attacker-supplied text. The checker and runner 59 share the seed compiler lineage. Binary equality and SHA256 identities are reproducibility and 60 identity evidence, not diverse compilation or proof of general semantic correctness. 61 62 ## Branch-form semantics (#669) 63 64 `branch-forms.om` adds fifteen small programs covering every source conditional form: `eq`, `ne`, 65 `lt`, `le`, `gt` and `ge`; the CBZ path for a value compared with zero; `while` and `for` back 66 edges; the unconditional B over an `else`; a branch inside a called function; and the shift-width 67 and divide-by-zero trap sites. The coordinator compiles and executes each and compares the exit 68 with the fixed table in `formwant`. These cases check target selection, while `boundaries`, 69 `positive`, `negative`, `array-fill` and `mutant` continue to check the imm19 range and refusal. 70 Corpus mode 3 (a trap, then 300000 one-word lines) was a `negative` row (error 24: the trap stub sat 71 at the function's end) through omc `f4fa7951`; since 2026-11-11 omc places waiting trap stubs in an island 72 (OMEGESE 9.6), so `trapfar` compiles it and runs it to trap 2 (exit 102), the CBZ landing on the island's code-2 stub. 73 74 All imm19 writes still flow through `disp19`/`patch19`. The compiler does not expand or relax a 75 branch: a target outside the signed 19-bit word displacement, or an unaligned target, is refused 76 with error 24 before an artifact is accepted. Unconditional B uses `patch26` and the inspected 77 8 MiB output-pool capacity (through omc `f4fa7951`; since 2026-11-11 the AArch64 output ceiling is the 78 128 MiB imm26 reach itself, OMEGESE 9.6, and long functions get trap-stub islands). Evidence is `evidence/SECURITY-673/branchforms1`. 79 80 ## Strict launch profile (#670) 81 82 `execpure` (native host word 198) pins one executable as descriptor 3 and then applies a fixed 83 kernel profile before `execveat(AT_EMPTY_PATH)`: Landlock execute/read only beneath that inode, 84 `PR_SET_NO_NEW_PRIVS`, CPU/file/stack/core/process/descriptor/address-space limits, and a seccomp 85 filter that allows only stdin read, stdout/stderr write, the pinned exec and exit. Any setup 86 failure returns the kernel error; there is no weaker fallback. 87 88 `pure-child.om` is the hostile consumer; `pure-launch.om` is the caller; `pure-raw.om` emits four 89 fixed native images for absolute exec, raw open, raw getpid and a 1 GiB mmap. Build the launcher and 90 child with the rebuilt compiler, create `build/security673-pure/private.data` and `judge.data`, then 91 run `pure-launch build/security673-pure/pure-child` with `public-input` on stdin. Every assertion 92 must pass and the protected files must be unchanged. Evidence and traces are 93 `evidence/SECURITY-673/pure2`. This is a fixed strict profile, not a general sandbox; grant 94 generations, revocation and durable budgets remain open under #670/#649. 95 96 Descriptor scope is deliberate: generic `execprog` admits only descriptors 0, 1 and 2; 97 `execpure` adds exactly one pinned executable descriptor (3). Arbitrary high-descriptor handoff is 98 not part of the supported profile. A caller that needs other resources passes paths or data, not 99 inherited authority, so numeric descriptor reuse cannot resurrect an old grant. 100 101 Bypass controls remove one enforcement step at a time with `branch-mutate.om` and require the named 102 result: seccomp removed lets raw getpid through (71), Landlock restriction removed lets the second 103 image execute (77), CPU exhaustion dies with SIGXCPU (152), and a 1,048,577-byte write stops at the 104 1 MiB file limit (0, 1,048,576 bytes). An unavailable close_range refuses the launch with 38. 105 `pure-raw.om` accepts an optional absolute target path for the second-image and fixed-inode 106 controls. Evidence is `evidence/SECURITY-673/pure3`; the earlier author run is `pure1`. 107 108 ## Bounded source ingress (#671) 109 110 With fresh scratch, `build/gate669 3` runs twenty-two source cases through the real rebuilt compiler. 111 The generator is `hostile-corpus.om`; the existing coordinator is reused. The campaign covers 112 decimal length, nested values, nested blocks, large literals, function count, invalid control byte, 113 oversized pool, unterminated quote, unknown name, long whitespace, input capacity and float literals 114 of `1000001` zero digits (fraction, exponent, and an untyped literal typed by the other operand, also at 115 70 digits). Twelve accepted fixed-compiler programs execute with expected exits; ten refused inputs 116 leave empty artifacts. Both parities of the nested Boolean expression are exercised. 117 118 The float cases close #965 findings: before the fix a fraction or exponent of more than `1000000` zero 119 digits trapped 4 (exit 104) in the single-loop scans of `fparse`, `fexp` and `fbits`, and an untyped 120 literal of 64 or more characters was re-read from the wrong span (`pos*64+len`), so `add 0..01.5 x` 121 with `x = 2.0` silently computed 2. 122 123 A separately compiled numeric-limit mutant changes the existing20-digit rule to21. It accepts 124 the21-zero source, violating the published profile; the fixed compiler refuses6. That mutant's 125 program is format-inspected and retained, not executed. The independent report records the 126 distinction. The gate logs elapsed nanoseconds for each child. External `/usr/bin/time -v` can 127 record observed campaign wall time and maximum resident memory; those observations do not 128 establish a general complexity bound or enforce a kernel memory limit. 129 130 This is a deterministic bounded source campaign. Other ingress paths, broad grammar/mutation 131 fuzzing, authenticated canonicalization and kernel resource limits remain under their existing 132 owners. Current evidence and independent review are `evidence/SECURITY-673/hostile1` and 133 `independent671`. Earlier failed development fixtures are preserved and excluded from PASS. 134 135 The same gate also runs nine packed-list cases through a compiled consumer. `packet-corpus.om` 136 builds valid, empty-count, over-count, truncated-record, trailing-byte, empty-path, embedded-NUL 137 and oversized-record packets; `pkt-consumer.om` reads one packet and calls `execprog`. Accepted 138 modes execute `/bin/true`; malformed modes trap 3 with exit 103 before any kernel exec. Evidence is 139 `evidence/SECURITY-673/packet1`; the wider ingress map is `evidence/SECURITY-673/ingress-inventory.md`. 140 141 `renames` is qualified by seven cases: the accepted pair must rename the source and leave the 142 destination, while one record, three records, either empty path, a trailing byte and an embedded NUL 143 each trap 3 before the kernel rename. The consumer creates the source under the scratch directory, 144 so the positive case also proves the packet was consumed exactly. Evidence is 145 `evidence/SECURITY-673/renames1`. 146 147 Path and argument boundaries are covered by seven more cases: a valid `fopen`; embedded-zero and 148 4096-byte paths trap 3; an empty path returns the kernel's negative errno; `argread` into a short 149 buffer returns -105 without changing the slice; an invalid index traps 3; and an exact-capacity 150 read returns the length. Evidence is `evidence/SECURITY-673/paths1`. Path traversal is not confined 151 by `fopen`; the strict launch profile is the confined path. Legacy manifest, receipt, RPC, model, 152 trace and device parsers remain NOT_RUN. 153 154 155 ## Authority regression integration (source-reviewed, host-run) 156 157 The existing `authority` campaign now includes `dispatch-order-gate.om`, 158 `store-exact-gate.om` and `store-cleanup-gate.om` after the existing action, 159 delegation, reuse, store, dispatch, SHA256 and lock gates. These are the same 160 committed compilation units documented in `seed/authority/README.md`; the 161 coordinator neither recomposes them nor changes their production components. 162 The expected exits are all 0, with the following child stdout: 163 164 - `dispatch order checks=3 fails=0` 165 - `store exact checks=4 fails=0` 166 - `store cleanup cases=18 fails=0` 167 168 Each new gate is compiled through the existing `compile` path using the twice 169 rebuilt compiler. Before running it, the coordinator creates a fresh numbered 170 mode-0700 directory under its already-fresh `build/security673-native` directory. 171 An existing directory or any mkdir error fails closed. Only the forked child 172 changes into it, after opening stdin/stdout/stderr from the repository-root 173 parent. Consequently each test's relative `build/authority-store` is private to 174 that test, including the malformed files deliberately retained by store-exact. 175 The parent, other gates and compiler invocations keep their original cwd. 176 Existing authority gates keep their existing fixture paths; this change does 177 not isolate or redesign those gates. 178 179 The executable argument is an absolute path formed from checked `cwd` output 180 and the exact numbered compiler artifact before the child changes directory. 181 Path and argument-packet capacity failures refuse the run. Child `chdir` failure 182 exits 97 before `execprog`; failed exec exits 98. The existing expected-exit, 183 signal and deadline checks reject both, and no later PASS is reached. The log 184 records the absolute executable, input/output/error artifacts and `cwd=` path. 185 The filesystem separation is for fixture/evidence retention, not confinement or 186 protection against a hostile actor replacing trusted checkout files. The three 187 new tests do not intentionally launch an effect child on their expected paths. 188 Their negative controls remain separate replay procedures, not coordinator runs. 189 190 Source composition, path construction, identifier limits and fail-closed control 191 flow were first checked without executing Omega binaries. Native run (2026-10-31, 192 Linux AArch64, seed/out/omc `7a8b84fc`): the full coordinator `gate669.om` exits 0 193 with `GATE669 PASS`; the dispatch-order, store-exact and store-cleanup steps each 194 log `exit=0 expected=0` for compile and run in their own `cwd=` directories. The 195 three negative controls were replayed separately (see `seed/authority/README.md`) 196 and each exits 1. This is host execution, not hardware qualification. Existing 197 L408 compiler integration and Renda review ownership are unchanged.