decomp(aterm): typed progress record and recovered AES/Discovery/Protocol structure #1293

Merged
coah80 merged 1 commits from agent/w0929/sol-r2b-land into main 2026-10-09 00:23:50 +00:00
coah80 commented 2026-10-09 00:23:48 +00:00 (Migrated from github.com)

worker 5a9a04c6. instruction-exact functions: 20/26 gate: 0 regressions, 0 forbidden, 0 readability, dol sha1 26116613f624061ba99c8d1a299aaa6efa85670d

worker 5a9a04c6. instruction-exact functions: 20/26 gate: 0 regressions, 0 forbidden, 0 readability, dol sha1 26116613f624061ba99c8d1a299aaa6efa85670d
graphify-labs[bot] (Migrated from github.com) reviewed 2026-10-09 00:28:03 +00:00
graphify-labs[bot] (Migrated from github.com) left a comment

Graphify reviewed this change.

Worth a look — the grounded gate found no coupling regressions or blocking issues, but 1 advisory finding(s) below merit a look before merge.

Formal verification. PR-changed functions: 0/3 verified (0 proven, 0 may-equivalent, 0 distinguished) · 3 not verified (3 unsupported).

Not verified on this run: ATERMAesExpandEncryptKey (unsupported), ATERMDiscoverAccessPoints (unsupported), ATERMRunConfigProtocol (unsupported).


Graphify review — findings

Refactors ATERM.c toward matching codegen without changing behaviour. ATERMRunConfigProtocol now uses two inline helpers: atermWaitForInterval for the 500 ms alarm wait, and atermDecodeEncryptedResponse for the shared checksum, sequence and AES-unwrap decode in both receive states. ATERMDiscoverAccessPoints reports progress through a typed AtermProgress with a separate changedIndex instead of an overloaded progressInfo array, alongside local reordering here and in ATERMAesExpandEncryptKey, plus the archived sol_r2 attempt notes.

Worth a look

  • Attacker-controlled packet length is used without bounds checking in decode helper — src/scene/setting/ATERM.c:1406 · Escalate · medium
    • agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review

Review partial — this diff was larger than one review pass covers, so later files were not reviewed; some findings may be missing.

Analysis details — impact, health, verification

Impact & health

Graphify review

Impact — 52 functions depend on the 52 functions this change touches.

Health — grade B; 5 existing hotspot(s) in the area this change touches (pre-existing, not introduced here):

  • ATERMRunConfigProtocol() — 1 callers, 22 callees (high)
  • ATERMScanAccessPoints() — 1 callers, 12 callees (high)
  • ATERMStartNetworkStack() — 1 callers, 12 callees (high)
  • ATERMDiscoverAccessPoints() — 1 callers, 6 callees (medium)
  • ATERMi_ApConfigEnd() — 0 callers, 6 callees (medium)

Verification — 52 functions in the blast radius were not formally verified this run (proofs are advisory here).

Gate & verification

graphify gate

PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.

Advisory (not blocking):

  • verification_scope: 52 function(s) in the blast radius were not formally verified this run

Formal verification

Could not verify: Could not verify ATERMAesExpandEncryptKey.

The verifier did not have enough to check ATERMAesExpandEncryptKey, so it is saying so rather than guessing. No false assurance is the whole point.

Guarantee: No guarantee either way, this is an honest abstention, not a pass.

Note: Reason: unsupported parameter type(s)

Could not verify: Could not verify ATERMDiscoverAccessPoints.

The verifier did not have enough to check ATERMDiscoverAccessPoints, so it is saying so rather than guessing. No false assurance is the whole point.

Guarantee: No guarantee either way, this is an honest abstention, not a pass.

Note: Reason: unsupported parameter type(s)

Could not verify: Could not verify ATERMRunConfigProtocol.

The verifier did not have enough to check ATERMRunConfigProtocol, so it is saying so rather than guessing. No false assurance is the whole point.

Guarantee: No guarantee either way, this is an honest abstention, not a pass.

Note: Reason: unsupported return type: s32

<!-- graphify-inline:804f9d1988cecbda8da0b5f84cb6f5998081c095 --> **Graphify reviewed this change.** **Worth a look** — the grounded gate found no coupling regressions or blocking issues, but 1 advisory finding(s) below merit a look before merge. **Formal verification.** PR-changed functions: 0/3 verified (0 proven, 0 may-equivalent, 0 distinguished) · 3 not verified (3 unsupported). _Not verified on this run: `ATERMAesExpandEncryptKey` (unsupported), `ATERMDiscoverAccessPoints` (unsupported), `ATERMRunConfigProtocol` (unsupported)._ --- ## Graphify review — findings Refactors `ATERM.c` toward matching codegen without changing behaviour. `ATERMRunConfigProtocol` now uses two inline helpers: `atermWaitForInterval` for the 500 ms alarm wait, and `atermDecodeEncryptedResponse` for the shared checksum, sequence and AES-unwrap decode in both receive states. `ATERMDiscoverAccessPoints` reports progress through a typed `AtermProgress` with a separate `changedIndex` instead of an overloaded `progressInfo` array, alongside local reordering here and in `ATERMAesExpandEncryptKey`, plus the archived `sol_r2` attempt notes. **Worth a look** - **Attacker-controlled packet length is used without bounds checking in decode helper** — `src/scene/setting/ATERM.c:1406` · _Escalate · medium_ - agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review _Review partial — this diff was larger than one review pass covers, so later files were not reviewed; some findings may be missing._ <details> <summary>Analysis details — impact, health, verification</summary> ### Impact & health ## Graphify review **Impact** — 52 functions depend on the 52 functions this change touches. **Health** — grade B; 5 existing hotspot(s) in the area this change touches (pre-existing, not introduced here): - `ATERMRunConfigProtocol()` — 1 callers, 22 callees (high) - `ATERMScanAccessPoints()` — 1 callers, 12 callees (high) - `ATERMStartNetworkStack()` — 1 callers, 12 callees (high) - `ATERMDiscoverAccessPoints()` — 1 callers, 6 callees (medium) - `ATERMi_ApConfigEnd()` — 0 callers, 6 callees (medium) **Verification** — 52 functions in the blast radius were not formally verified this run (proofs are advisory here). ### Gate & verification ## graphify gate **PASS** — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed. Advisory (not blocking): - verification_scope: 52 function(s) in the blast radius were not formally verified this run ### Formal verification **Could not verify**: Could not verify `ATERMAesExpandEncryptKey`. The verifier did not have enough to check `ATERMAesExpandEncryptKey`, so it is saying so rather than guessing. No false assurance is the whole point. _Guarantee:_ No guarantee either way, this is an honest abstention, not a pass. _Note:_ Reason: unsupported parameter type\(s\) **Could not verify**: Could not verify `ATERMDiscoverAccessPoints`. The verifier did not have enough to check `ATERMDiscoverAccessPoints`, so it is saying so rather than guessing. No false assurance is the whole point. _Guarantee:_ No guarantee either way, this is an honest abstention, not a pass. _Note:_ Reason: unsupported parameter type\(s\) **Could not verify**: Could not verify `ATERMRunConfigProtocol`. The verifier did not have enough to check `ATERMRunConfigProtocol`, so it is saying so rather than guessing. No false assurance is the whole point. _Guarantee:_ No guarantee either way, this is an honest abstention, not a pass. _Note:_ Reason: unsupported return type: s32 </details>
Sign in to join this conversation.