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
omega-mv / evidence / SECURITY-673 / packet1 / REPORT.md
| 1 | # Packed-list ingress qualification for Omega #671 |
| 2 | |
| 3 | Date: 2026-10-23. Parent tracker: #673. Branch: `fix/security673-qualified`. |
| 4 | Platform: Linux AArch64, native execution. No device, GPU or network ingress was exercised. |
| 5 | |
| 6 | ## Threat and protected property |
| 7 | |
| 8 | A caller-supplied packed list can be truncated, over-counted, padded with trailing bytes, contain an |
| 9 | embedded zero in a path, or carry an offset/length that exceeds the actual array. The protected |
| 10 | assets are the compiler's host-word acceptance decision and the kernel argument vector: a malformed |
| 11 | packet must trap before `execve`, and a valid one must be consumed exactly. |
| 12 | |
| 13 | Enforcement is the existing `hpack` lowering in `seed/omc/omc.om` (line 2533) for `execprog`, |
| 14 | `renames` and the other packed-list words. At runtime it requires a `u16` count in 1..64, a total |
| 15 | packet of at most 4096 bytes, a `u16` length plus that many bytes per record, a nonempty first |
| 16 | record for `execprog`, no embedded zero, and no trailing bytes. Failures trap 3 before descriptor |
| 17 | closure and before `execve`. The parser is emitted into the compiled program; the test consumer is |
| 18 | a normal compiler output, not a copied implementation. |
| 19 | |
| 20 | ## Cases and results |
| 21 | |
| 22 | `packet-corpus.om` writes raw packets; `pkt-consumer.om` reads up to 4096 bytes and calls |
| 23 | `execprog pkt 0 n`. The coordinator compiles both with the rebuilt compiler, generates each packet, |
| 24 | and compares the consumer exit. Exit 0 means `/bin/true` was executed; exit 103 is trap 3. |
| 25 | |
| 26 | | Mode | Packet | Expected exit | Observed | |
| 27 | | --- | --- | --- | --- | |
| 28 | | 0 | one record `/bin/true` | 0 | 0 | |
| 29 | | 1 | count 0 | 103 | 103 | |
| 30 | | 2 | count 65 | 103 | 103 | |
| 31 | | 3 | count 1, length 5, three bytes | 103 | 103 | |
| 32 | | 4 | valid record plus one trailing byte | 103 | 103 | |
| 33 | | 5 | first record empty | 103 | 103 | |
| 34 | | 6 | embedded NUL in `/bin/tr\0ue` | 103 | 103 | |
| 35 | | 7 | record length 4093 with 4092 bytes present | 103 | 103 | |
| 36 | | 8 | 64 records, first `/bin/true` | 0 | 0 | |
| 37 | |
| 38 | Mode 7 is exactly 4096 bytes on stdin; the declared record length exceeds the bytes actually |
| 39 | present, so the parser refuses rather than reading past the packet. The accepted modes execute the |
| 40 | real executable, so the test also proves the parser produced a usable argument vector for the |
| 41 | kernel, not just a return value. |
| 42 | |
| 43 | ## Executed gates |
| 44 | |
| 45 | | Command | Result | |
| 46 | | --- | --- | |
| 47 | | `build/gate669-pkt` (normal) | exit 0, `GATE669 PASS` | |
| 48 | | `build/gate669-pkt 3` (source campaign) | exit 0, `GATE671 SOURCE PASS` | |
| 49 | | `sh seed/host/gate.sh` | exit 0, all host groups pass | |
| 50 | |
| 51 | Raw output is `gate-packet.log`, `gate-hostile.log` and `host-gate.log`; stderr for the gate runs is |
| 52 | empty. `identities.txt` binds the compiler, corpus, consumer, gate and logs by SHA256. |
| 53 | |
| 54 | ## Residual limits |
| 55 | |
| 56 | - `execprog` is qualified; `renames` and other `hpack` words share the parser but were not separately |
| 57 | exercised with their own record-count and path rules. |
| 58 | - `argread`, native path words, environment strings, manifests, receipts, RPC arguments, model |
| 59 | metadata, trace bundles and device command descriptions remain under the inventory in |
| 60 | `../ingress-inventory.md`. Only the compiler source and packed-list paths are currently active |
| 61 | seeded `.om` ingress. |
| 62 | - This is a deterministic case set, not grammar-aware fuzzing, a complete parser proof, or a kernel |
| 63 | resource limit. The compiler, corpus and consumer share the seed lineage. |
| 64 | - This does not close #671 or #673. |