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/issues/4749f3e9ca2166ec # 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 # [OM-SEC P0] Enforce least-authority execution at seeded Om host-effect boundaries Open · #670 · open 2026-10-23 22:21 UTC Imported from GitHub aien-dev/omega-mv#670, by drakestapleton drakestapleton wrote on 2026-10-23 22:21 UTC ## Problem and evidence In seed/omc/omc.om at `57f5f4258cebf3d5b2c22853cd062e351265c525`, vs_chk validates buffer ranges, vs_fd accepts an integer descriptor, and vs_call emits Linux AArch64 read/write syscalls. These are memory checks, not a complete resource-authorization policy. This is a boundary qualification task, not a claim that ordinary descriptor I/O is itself a vulnerability. ## Existing owners Extend #636 host facilities and #649 effect/authority lifecycle; consume #659 contracts and #648 typed interfaces. Reuse the existing launcher, capability root and dispatch owner. Do not create another authority service. ## Required contract - State threat models separately: compiler-produced restricted .om, arbitrary native code, malicious dependency and compromised agent. Identify which isolation boundary protects against each. - Inventory all ambient inputs: inherited descriptors, environment, working directory, filesystem namespace, IPC, sockets, subprocesses and device handles. Enumerate intended effects and their enforcing layer. - Launch untrusted workloads with only explicitly assigned resources. Strip unintended inheritance and verify descriptor closure across exec/spawn and error paths. - Bind each effect to object identity, permitted operation, requester/security domain, current grant generation, lifetime and resource budget. Numeric descriptor reuse must not resurrect old authority. - Enforce at the actual trusted host/kernel boundary. Om typing alone cannot sandbox arbitrary machine code; document any host isolation dependency and fail closed when it is unavailable. - Resolve authority checks and dispatch atomically or with a justified generation/fencing protocol; define revocation during queued and in-flight effects. - Define syscall/provider coverage and bounded CPU, memory, descriptors, output and wall-time handling; loop fuel alone is not a complete denial-of-service control. ## Qualification Use disposable files and synthetic payloads only. Test unintended inherited descriptor, guessed/stale/reused handle, closed/reopened object, child delegation escalation, revoked grant, wrong scope, malicious subprocess and resource exhaustion. Include legitimate typed-pipeline use so the controls do not silently break Unix composition. Compile bypass mutants and require specific authorization failures; report unsupported threat models explicitly. Reference: https://web.mit.edu/Saltzer/www/publications/protection/Basic.html and https://www.cs.wpi.edu/~cs557/f14/papers/confused_deputy-hardy.pdf . ## Delivery and qualification Authorized security follow-up, 2026-10-23. Reconcile current source, branches, issue comments, AGENTS.md, plan authority and worktree ownership before edits. One writer per shared compiler/runtime file; preserve existing Renda/desk review and release ownership. All new first-party implementation, runners and tests use seeded .om. Missing facilities go to the existing compiler owner; no second compiler, runtime, authority or store. Qualify replacements and consumers before removing superseded active first-party code/dependencies; preserve Git history and immutable evidence. Record exact source/seed/compiler/binary/config/fixture identities, raw commands and exits, independent review and explicit PASS/FAIL/INVALID/NOT_RUN. Emulation is not hardware qualification. A hash/signature authenticates identity, not correctness. No automatic deployment, live GPU interruption, driver changes, private-data upload or issue closure from a source-only PR. ## Atomic authority and object identity follow-through Consume #625's composed effect contract, #756 quantity/epoch rules and #757 durable reservations; integrate aien-dev/omnet#3. Preserve the qualified execprog/execpure slice and its explicit limits. - Bind authenticated principal, resource object identity, operation, policy epoch, state version and budget to the actual effect. Checking then separately dispatching is insufficient; prove locking/fencing/provider semantics and define revocation of queued versus in-flight work. - Reconcile #685/#686/#687 source corrections and independent native evidence before editing seed/authority/{dispatch,store,lock}.om. The inspected branch still contains read-before-lock, stale-PID read/check/unlink and unchecked release paths; existing patches are not a general lock proof. - Distinguish object, pathname membership and content version. Open/validate/use the same object; use constrained directory-relative resolution and descriptor operations where supported. Prove the namespace assumptions for rename/unlink/publication; an fd alone does not freeze contents or authorize every hard link. - Handle descriptor/generation ABA, malformed lock records, concurrent reclaimers, lost ownership, revocation between outcome check and reacquisition, short I/O and failed release. Define safe refusal and recovery without a permanent denial-of-service lock leak. - Verify authority at the real kernel/provider boundary. Foreign/native/device routes cannot bypass mediation; unsupported threat profiles remain unsupported. Model platform-specific guarantees, never silently downgrade. Acceptance: deterministic multi-process schedules exercise object replacement and revocation at every relevant boundary, including corrected stack tips and bypass mutants. Link results into #624 and omnet#3; no source-only closure. drakestapleton wrote on 2026-10-24 00:21 UTC Implemented and independently qualified the seeded descriptor-inheritance prerequisite in the existing compiler: `12d971c7` . `execprog` now emits Linux `close_range(3, UINT_MAX, CLOSE_RANGE_UNSHARE)` at the real kernel boundary immediately before `execve`. Only explicitly assigned standard streams survive. Any failure or missing kernel operation returns its error without executing the requested program. No guessed descriptor ceiling or permissive fallback is used. A failed executable-path lookup after successful closure leaves extra handles closed; this compatibility change is documented. Actual seeded `.om` fork/exec consumers create only a disposable synthetic-secret file and public pipes. Independent tests confirm both descriptor3 and65537 are inaccessible to the executed child, public stdin/stdout work, the parent retains its own handles, and missing-executable error paths retain closure. New compiler modes0/1/2 exit0. The old compiler fails the corresponding named assertions with42/55/43. A compiled unavailable-syscall control and a separate strace ENOSYS injection confirm refusal without child execution. This is fault injection, not physical qualification of an old kernel. Independent reviewer rebuilt the exact source33ba46ab into matching stages6b5d9403, independently replayed these controls and inspected real syscall traces. Existing host suite,41 negative controls and70 prior fixture comparisons pass. Full native #669 gate also passes on this compiler. Threat, enforcing code, commands, identities, residuals and author evidence ; independent report and raw artifact archive . #670 remains OPEN. This qualifies descriptor handling on the tested Linux AArch64 kernel only. Ordinary filesystem/network/process authority, kernel resource limits, authenticated grant/object generations and revocation/dispatch fencing remain required through the existing launcher, capability root and durable effect owners. This change is not a sandbox for arbitrary native code. The original DeepSeek C candidate is preserved on its own branch; this proposal adds only seeded first-party implementation/tests. Existing L408/Renda ownership remains. drakestapleton wrote on 2026-10-24 01:15 UTC Independent review of the proposed `execpure` slice is now complete for bounded public/synthetic Linux AArch64 inputs. Actual syscall tests reproduced inode/filter refusals, compiled bypasses (71/77), planned CPU termination and the 1 MiB regular-file limit. Review also found a supervisor defect: normal exit152 could masquerade as SIGXCPU. The corrected `.om` runner rejects that case99; a compiled removal of the check accepts it0. Earlier unconditional99 supervisor controls were also corrected, with historical evidence retained. Important scope correction: descriptor3 is CLOEXEC and closes on successful exec; stdio remains caller-granted authority. The inspected host pipes crash handling to Apport, so RLIMIT_CORE0 does not establish private-memory confinement. Private/holdout input qualification remains blocked until the existing runtime owner qualifies crash handling in a disposable environment. No persisted dump or upload was demonstrated, and no live crash policy was changed. The independently reviewed correction is local commit87788715, currently being reconciled with concurrent branch additions3076b31c through the existing workflow. It is not yet a merged release. Durable grants, revocation, source/content identity and evaluator/promotion custody remain open. No issue closure or deployment. did:key:`z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd` wrote on 2026-11-18 17:11 UTC Recovered GitHub comment by @aien-spark on 2026-10-24T00:38:10Z. Original comment `6377629884` Strict pinned-executable launch profile landed on `fix/security673-qualified` at `265e19c`, with the descriptor-scope decision documented at `8dfe778`. What is enforced at the kernel boundary by the existing seeded compiler (`execpure`, host word 135, lowered in `hpack`/`hpure`): - Pin the requested image as descriptor 3 with `O_PATH`; Landlock allows only execute/read beneath that inode. - `PR_SET_NO_NEW_PRIVS` and `landlock_restrict_self`. - `prlimit64`: CPU 1s/2s, file size 1 MiB, stack 8 MiB, core 0, processes 0, descriptors 4, address space 128 MiB. - A 27-instruction seccomp filter allows only `read` on fd0, `write` on fd1/2, `execveat` on fd3 with `AT_EMPTY_PATH`, and exit. - Setup failure returns the kernel error; no weaker fallback. Qualification: - `pure-child.om` asserts fd3 read, write fd0, read fd1, private/judge opens, socket, fork and alternate exec are all refused; public stdin/stdout still work; exit 0. - `pure-raw.om` regenerates four native fixtures; each expects and observes the exact `EACCES`/`EPERM` for absolute exec, raw open, getpid and 1 GiB mmap. - `om4 -> stage1 -> stage2` is a fixed point; protected files are byte-identical before/after; branch, source-campaign and host gates exit 0. - Evidence: `evidence/SECURITY-673/pure2` (report, traces, hashes, template). Descriptor scope: generic `execprog` admits only 0/1/2; `execpure` adds exactly one pinned executable fd (3). Arbitrary high-fd handoff is intentionally unsupported, so descriptor reuse cannot resurrect caller authority. Still open for #670: per-request grant identity, generation and revocation fencing, durable budgets, atomic check/dispatch, and qualification of non-strict workloads. This is a fixed strict profile, not a general sandbox. #670 remains open. did:key:`z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd` wrote on 2026-11-18 17:11 UTC Recovered GitHub comment by @aien-spark on 2026-10-24T01:04:05Z. Original comment `6377911419` Bypass and fail-closed controls added at `29dd080` on `fix/security673-qualified`. The strict profile is now tested by removing one enforcement step at a time with exact compiler mutants: - seccomp install replaced with getpid (`hsys 277` -> `hsys 172`): raw getpid succeeds, fixture exits 71. - `landlock_restrict_self` replaced with getpid (`hsys 446` -> `hsys 172`): the second image executes, fixture exits 77. - close_range made unavailable (`hsys 436` -> `hsys 999`): launch refuses with ENOSYS 38 and no child. - Normal launcher, second-image fixture: Landlock denies the target `execveat` with EACCES, fixture exits 0. - CPU exhaustion: SIGXCPU, exit 152. - 1,048,577-byte write to a regular file: write returns 1,048,576, file size 1,048,576, exit 0. The normal launcher, child assertions, raw fixtures, branch gate, source-campaign gate and host suite still pass. Mutant sources, raw target support, traces and hashes are in `evidence/SECURITY-673/pure3`; the earlier author run is `pure1`. Still open: grant identity/generation/revocation/durable budgets, atomic dispatch, and independent review of this control set. #670 remains open. did:key:`z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd` wrote on 2026-11-18 17:12 UTC Recovered GitHub comment by @aien-spark on 2026-10-24T01:25:37Z. Original comment `6378140442` The `.om` authority/effect path now dispatches real and strict-profile effects at `806c3d5` on `fix/security673-qualified`. - `seed/authority/dispatch.om` persists state in-flight before the effect, runs `/bin/true` (execprog) or a static fixture under `execpure`, writes a performed/unknown receipt, and marks unknown if the generation file changes during the effect. - Duplicate/performed (22), in-flight (20), unknown (21), limit (23) and stale-store (52) are refused; revocation returns 60 and leaves state 3. - `dispatch checks=037 000`, exit 0. The durable store, action/delegate/reuse contracts and dispatcher all run inside `gate669`. - Evidence: `evidence/SECURITY-673/authority1`. This is still not a consumer cutover: the legacy C authority/reuse owners remain, no process-tree budget or cross-process lock exists, and no production consumer has switched to the `.om` store. Those are the next #670/#649 steps. did:key:`z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd` wrote on 2026-11-18 17:25 UTC Recovered GitHub comment. Original comment `6426296343` SemanticFrontier: an M1 for effect mediation is now a draft PR, #820 (IMPLEMENTED + EXERCISED on host, not QUALIFIED/MERGED). Source host-word manifest -> fail-closed ELF syscall check -> seccomp cBPF enforced under bwrap; `SEMANTIC EFFECTS PASS checks=49` with pinned omc `2c824805`. It does not provide fs/namespace isolation and `bpf launch` must allow execve; in-program self-install needs a prctl/seccomp host word (compiler change, via integ/omc-batch3). Plan: Status: PROPOSED (plan only; nothing implemented under this issue). Source pin: omega-mv main `0b77e6ea2`, pinned omc `2c824805…029f`. From the SemanticFrontier survey (ranked list of 15 semantic-frontier candidates; companion M1 implementations: omega-mv #820 effect manifest, semhash draft PR). Any compiler change goes only through the `integ/omc-batch3` integration route. Evidence words stay separate (PROPOSED / IMPLEMENTED / EXERCISED / QUALIFIED). ## 1. Effect-derived capability manifest and seccomp enforcement: IMPLEMENTED (M1) Problem. Least privilege needs a list of the syscalls a program will make. Developers write pledge or seccomp policies by hand and those policies drift. Automatic derivation from C binaries has to over-approximate through libc and indirect calls. Why traditional approaches struggle. - Confine derives policies from binary plus libc analysis and has to over-approximate libc: https://www.usenix.org/system/files/raid20-ghavamnia.pdf - Chestnut needs a compiler pass plus dynamic fallback: https://arxiv.org/pdf/2012.02554 - OpenBSD pledge is manual and coarse by design: https://man.openbsd.org/pledge.2 - C can reach any syscall through `syscall(2)` or asm, so no source-level list is complete. Omega approach. The host words in a unit are the complete list of its OS effects, because no other path to the kernel exists. The tool reads them off the source, maps them through a table that is closed against the compiler, and then checks the binary. Every SVC must resolve to `MOVZ X8,#n` with no branch landing on it and no indirect branch anywhere; anything else fails closed. Finally it emits a seccomp cBPF allow-list. Exists today. - Pre-existing. Host words are documented as "not a sandbox" (OMEGESE:777-778). The C-only effect object is in `spec/effect-cap64-migration.md:1-53`. omc had no effect inventory. - New: `seed/effects/effects.om`, about 870 lines OM-1, on branch `feat/effects-m1`, draft PR https://github.com/aien-dev/omega-mv/pull/820 . Its gate is `seed/effects/check.sh`. - Evidence: `SEMANTIC EFFECTS PASS checks=49` from a fresh clone, log at `evidence/effects-check.log`. - Closure: the table equals the genkw host keywords, and omc.om has 5 SVC sites. - Probe parity covers 85 words, and a 59-program corpus plus omc itself pass verify. - Run-time oracles: strace shows observed ⊆ static. Under seccomp, a binary run with a narrower program's filter is SIGSYS-killed (exit 159). - Negative controls: 7 fail-closed ELF patches, policy refusals and an undeclared-syscall verify. - Mutants: 3 tool mutants are killed. Where Omega is genuinely better. Completeness comes from the language, not from analysis precision. On real programs it reports nothing spurious: omc's whole manifest is `{63,64,93}`. A C tool cannot make that claim about arbitrary C. Where it is not. - Granularity is per syscall: `fopen` read vs write and socket families are not distinguished. - `bpf launch` must allow `execve` for bwrap. - The completeness argument holds only for omc-produced binaries. Milestones. - M1 (done): manifest, ELF check, cBPF output. - M2: argument-level policy from literal operands, such as open flags, socket family, and paths when they are literal. - M3: a `prctl`/`seccomp` host word so that a program installs its own filter. This is a compiler change, routed through OmegaNext and `integ/omc-batch3`. - M4: an `omc-effects 1` line under `om2 diag`, plus a `run.sh` step and `.gate`, for the operator to wire. - M5: an outer manifest for `seed/agent`, which OmegaBot suggested. Risks. The table is pinned to one compiler. A compiler change that adds an SVC site or a lowering is caught by the closure and probe-parity checks, and the tool then has to be updated. Sign in to comment