interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / evidence / SECURITY-673 / branchforms1 / REPORT.md

82 lines · 4375 bytes Raw Blame History Source

Branch-form semantic qualification for Omega #669

Date: 2026-10-23. Parent tracker: #673. Branch: fix/security673-qualified. Base: 540e8bcd plus the changes in this directory. Platform: Linux AArch64, native execution only.

Threat and protected property

Source can place a conditional or loop edge at or beyond the AArch64 imm19 range, or at a function boundary where an encoder could patch the wrong place. The protected asset is correspondence between the source control flow and the emitted branch target. The failure mode under test is silent truncation or a branch to a different instruction, not host compromise.

Enforcement remains the single checked path in seed/omc/omc.om: disp19 (line 935) derives and checks the signed word displacement, and patch19 (line 947) is the only imm19 writer. patch26 (line 952) writes unconditional B and relies on the inspected 8 MiB output-pool capacity, which is below the signed 26-bit reach.

Encoder inventory

Source formEnforcing emitterBranch instructionPatching path
if/while condition on a valuecond (line 2999)CBZ Xr; B.cond for a constant conditionpatch19 in s_end
if/while condition with relational operandsbinop/condsB.cond with the inverted conditionpatch19 in s_end
elses_elseB (unconditional) over the else partpatch26
while/for back edges_end, blo (line 3055)B / B.LO to the loop headpatch19
Local array fillsa_arrB.LO back to the fill looppatch19 via blo
Trap sites, including shift/width checkstrapsite (line 1813)CBNZ/B.HS to the trap stubpatch19 in finish
Boolean branch materializationbbr pathsB.condpatch19
Host-word packet/error brancheshpack, hpath, hargs, hwaitioB.cond/CBZ to a return/error pathpatch19

All imm19 users flow through disp19; there is no second relocation encoder. The compiler does not expand a branch or relax layout. A displacement outside -1048576..+1048572 bytes, or an unaligned target, is refused with error 24 before an artifact is accepted. The declared refusal bound is therefore 2^18-1 words forward and 2^18 words back, matching the ISA field.

Added semantic cases

branch-forms.om generates fifteen fixed programs. Each is compiled by the rebuilt compiler and executed natively; the coordinator compares the actual exit:

ModeFormExpected exit
0if eq register, taken11
1if ne register, not taken12
2if lt taken11
3if le taken11
4if gt taken11
5if ge taken11
6if eq against zero (CBZ path)11
7if ne against zero, false12
8if eq false12
9while back edge3
10for back edge3
11if/else unconditional B21
12branch inside a called function30
13shift-width trap site107
14divide-by-zero trap site102

These complement, rather than replace, the existing range cases: boundaries checks the encoder extrema directly, positive/negative check source-level range refusal, array-fill exercises the real backward B.LO caller, and mutant proves a weakened guard is caught by independent decoding.

Executed results

CommandResult
build/gate669-new (normal)exit 0, GATE669 PASS
build/gate669-new 3 (source campaign)exit 0, GATE671 SOURCE PASS
sh seed/host/gate.shexit 0, all nine host groups pass

Raw stdout is gate-branch.log, gate-hostile.log and host-gate.log; stderr for the gate runs is empty. identities.txt binds the compiler source, gate, corpus, rebuilt compiler and logs by SHA256.

Residual limits