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 / paths1 / REPORT.md
| 1 | # Native path and argument ingress for Omega #671 |
| 2 | |
| 3 | Date: 2026-10-23. Parent tracker: #673. Branch: `fix/security673-qualified`. |
| 4 | Platform: Linux AArch64, native execution. |
| 5 | |
| 6 | ## Threat and protected property |
| 7 | |
| 8 | A caller can supply a path longer than 4095 bytes, embed a zero byte, pass an empty path, or ask |
| 9 | `argread` for more bytes than the destination holds. The protected assets are the compiler's path |
| 10 | copy at the kernel boundary and the caller's destination slice; a refused operation must not leave |
| 11 | a partially overwritten buffer or perform a kernel open. |
| 12 | |
| 13 | Enforcement is the existing `hpathcp`/`hpath` lowering and `argread` in `seed/omc/omc.om`. The |
| 14 | consumer is a normal compiler output. |
| 15 | |
| 16 | ## Cases and results |
| 17 | |
| 18 | Mode byte on stdin; `argread` modes also receive `seed/omc/omc.om` as the first argument. |
| 19 | |
| 20 | | Mode | Operation | Expected | Observed | |
| 21 | | --- | --- | --- | --- | |
| 22 | | 0 | create and open `build/security673-native/path-ok` | 0 | 0 | |
| 23 | | 1 | `fopen` path with embedded zero | trap 3 | 103 | |
| 24 | | 2 | `fopen` path of 4096 bytes | trap 3 | 103 | |
| 25 | | 3 | `fopen` empty path | negative errno, no open | 0 (consumer accepts the negative result) | |
| 26 | | 4 | `argread` into a 1-byte buffer for a longer argument | return -105, slice unchanged | 0 (consumer verifies -105) | |
| 27 | | 5 | `argread` invalid index 99 | trap 3 | 103 | |
| 28 | | 6 | `argread` exact 4096-byte capacity | positive length | 0 | |
| 29 | |
| 30 | Mode 3 is deliberately not a trap: the documented contract refuses embedded zero and overlength |
| 31 | paths before the kernel, while an empty path reaches `openat` and returns the kernel's negative |
| 32 | errno. The consumer checks that it is negative and does not treat an empty string as a valid open. |
| 33 | Mode 4 checks the documented `-105` short-capacity result; the destination byte is not changed. |
| 34 | |
| 35 | ## Executed gates |
| 36 | |
| 37 | | Command | Result | |
| 38 | | --- | --- | |
| 39 | | `build/gate669` (normal) | exit 0, `GATE669 PASS` | |
| 40 | | `build/gate669 3` (source campaign) | exit 0, `GATE671 SOURCE PASS` | |
| 41 | | `sh seed/host/gate.sh` | exit 0, all host groups | |
| 42 | |
| 43 | Raw output is `gate-paths.log`; `identities.txt` binds the compiler, consumer, gate and log. |
| 44 | |
| 45 | ## Residual limits |
| 46 | |
| 47 | - Path traversal and authority resolution are not confined by `fopen`; the strict `execpure` |
| 48 | profile is the confined launch path, and general filesystem authority remains #670/#649 work. |
| 49 | - Manifests, receipts, RPC arguments, model metadata, trace bundles and device command descriptions |
| 50 | remain legacy/migration dependencies, not PASS. |
| 51 | - The compiler, consumer and gate share the seed lineage. This does not close #671 or #673. |