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 / 669-report.md

125 lines · 7316 bytes Raw Blame History Source

Omega #669 qualification: AArch64 conditional branch displacement

Date: 2026-10-23. Parent tracker: #673. Branch: fix/security673-branch-range. Base commit: f0499f415571bdd7496b6de391096915e78f7556. Status: PASS for the bounded forward property; parent #673 remains open. No formal proof and no claim of an unhackable system.

Threat model and protected asset

The compiler emits executable machine code from untrusted .om source. The protected asset is the correspondence between the source's structured control flow and the branch targets in the accepted artifact. A silently truncated B.cond, CBZ or CBNZ displacement can send execution to a different instruction than the source required. The baseline showed that this is reachable and produces a program that Linux kills with SIGSEGV, so the immediate impact is loss of integrity and availability of the compiled program, not a proof of privilege escalation.

Out of scope for this slice: physical attacks, malicious firmware, a compromised compiler binary, and source that is already trusted to be correct. Those remain #673 assumptions.

Authoritative source and artifact identities

ItemIdentity
Compiler source before fixseed/omc/omc.om sha256 74620988c967f18f9757807fc1d6f713c3120513c2a4a4aaba671e3019e8865e
Compiler source after fixseed/omc/omc.om sha256 35cab5e41fc2c020903f1318c1ff8d83f8701255b41b5ca8ef5395f706c015a4
Baseline compiler binarysha256 e5d60db892c8f21cc8c9128af26d8bded0e96d7f92946f5a549397c43a872649 (om4-built, self-stable)
Fixed compiler binarysha256 2c189f308c78e64e1b51ac86b139e8a662d5e622b764674f068b07e178fab0e9
Fixed stage 1 = stage 2 = stage 3yes, all three 109,048 bytes
Independent decoderGNU objdump (GNU Binutils for Ubuntu) 2.42, outside the seed compiler closure
Fixture generatorseed/qualification/security673/branch-corpus.om sha256 1cb80b66340e0deb2fbb04c49389884217b828677e745abf16f763464b6405ba
PlatformAArch64 Linux (arm64 workstation), native execution, not emulation

The branch base revision was reconciled from the issue: the concern exists at 57f5f425 (seed/omega-in-omega) and at f0499f41 (feat/seed-native-host). The security branch was cut from f0499f41; public main cd5897e3 has no seed/ tree.

Inventory of relocation encoders

EncoderFieldInstructionSource-controlled distanceControl
disp19 / patch19signed imm19 wordsB.cond, CBZ, CBNZyes: s_else, s_end (if/else/while/for exit)checked range and alignment, error 24
patch19 via finishsigned imm19 wordsB.cond at each trap siteyes: size of the function body before the handlersame check
blosigned imm19 wordsB.LO in the local-array fill loopno: fixed loop body, a few wordsrouted through disp19
patch26 / backsigned imm26 wordsBoutput pool is 8 MiB = 2^21 bytes, below the 2^25-word reachstructural invariant documented at patch26
patch19 callers in host wrapperssigned imm19 wordsB.condfixed wrapper code, at most hundreds of bytessame check
bl (calls)signed imm26 wordsBLoutput pool bound as abovenot changed

Reachability and reproduction

patch19 computed d = (target - at) >> 2 and masked it with 524287, with no local range test. For a forward displacement in 262144 .. 524287 words the mask is an identity and bit 18 is then interpreted as the sign bit by the CPU. The displacement is silently sign-extended.

The baseline reproduction is evidence/SECURITY-673/baseline669.log:

A generator error in the abandoned session (omc: line 14: error 16) was a broken fixture, not a compiler result; it was replaced before any conclusion was drawn.

Enforcing code

seed/omc/omc.om now has one checked encoder:

fn disp19 at ulong target ulong to ulong
diff = sub target at
if ne and diff 3 0
fail 24
end
if and gt diff 1048572 lt diff 18446744073709550592
fail 24
end
ret and shr diff 2 524287
end

Properties, oracles and results

Raw results: evidence/SECURITY-673/gate669.log. Driver: seed/qualification/security673/gate669.sh; fixture generator: seeded .om.

PropertyTestIndependent oracleResult
Small layout still correctN=16, run exit 0objdump: branch target = mov x1,#12345 marker at 0x54PASS
Exact forward maximumN=262,142, displacement 262,143 words = 1,048,572 bytesrun exit 0 and objdump target = markerPASS
One word beyondN=262,143, displacement 262,144 wordscompile exit 24, empty stdout, omc: line 262148: error 24PASS
Signed wrap inside 19 raw bitsN=524,287compile exit 24, empty stdoutPASS
Nested ifN=300,000error 24 before artifactPASS
While exitN=300,000error 24 before artifactPASS
Trap-site branchN=300,000error 24 before artifactPASS
Negative controlbound moved by one word to 1048580, N=262,144mutant compiles; objdump target 0xfffffffffff00014 != marker 0x100014; run exit 139PASS (decoder catches it)
Existing regressionssh seed/omc/gate5.sh177 cases, 0 FAIL, GATE5 PASSPASS

The mutant matters because the fixed compiler refuses that input but the mutant's program exits through a wrong path; the decoder, not the exit status, is the oracle.

Reproduce

sh seed/omc/gate5.sh                          # exit 0, GATE5 PASS (177 cases)
sh seed/qualification/security673/gate669.sh  # exit 0, GATE669 PASS (9 cases)

Both scripts were run at source hash 35cab5e4...; the gate log records the compiler and decoder identities. The bootstrap is stage1 = om4(omc.om), stage2 = stage1(omc.om), stage3 = stage2(omc.om).

Backward direction and remaining limits

The check accepts backward displacements down to -1,048,576 bytes. No source construct currently emits a long backward conditional branch: blo is the only negative imm19 encoder and its target is the head of a fixed-size array-fill loop. Its small-distance path is replayed by gate5's local-array cases, but the backward extremum itself is inspection-only, not a bounded dynamic test. The 26-bit unconditional B range is structurally unreachable because the output pool is 8 MiB; that invariant is stated in the compiler source and would need review if the pool size changed.

No formal proof. The evidence is bounded synthetic testing plus an independent decoder on this platform.