Skip to content

Feat/audit vague2 vm fixes#7

Merged
louis14448 merged 3 commits into
mainfrom
feat/audit-vague2-vm-fixes
Jun 2, 2026
Merged

Feat/audit vague2 vm fixes#7
louis14448 merged 3 commits into
mainfrom
feat/audit-vague2-vm-fixes

Conversation

@louis14448

Copy link
Copy Markdown
Contributor

Add wave 2 audit tests — VM fix regressions (6 scripts)

Covers six GnoVM fixes from the last quarter not yet tested on-chain.

Scripts

Script Commit Vector
audit_cross_realm_p_arithmetic 9e56b0c77 /p/-type arithmetic across realm boundaries
audit_preprocess_alloc_caps c98a2cdca Preprocessor embed-chain depth cap (> 8 levels rejected)
audit_panic_log_dos 4bb497abe Panic message rendering bounded by gas (30s timeout check)
audit_map_key_gas 720af8bcd Gas metering on ComputeMapKey (10k complex keys OOGs)
audit_nil_func_call a7e4c34b0 Nil function call → Gno panic, node stays live
audit_type_assert_nil 6dad8e39d Nil interface type assertion → Gno panic, node stays live

Notes

audit_preprocess_alloc_caps tests the preprocessor (type-checking phase
during MsgAddPackage), not runtime allocation — the fix bounds embed-chain
depth at 8. An initial version tested make([]byte, 100M) which was the wrong
code path.

All scripts use maketx run (functions have no cur realm — PR #5669).

Test results

All six pass as PATCHED on test-13.

Covers six GnoVM fixes from the last quarter not yet tested on-chain:

- audit_cross_realm_p_arithmetic.sh  — 9e56b0c77 (/p/-type arithmetic cross-realm)
- audit_preprocess_alloc_caps.sh     — c98a2cdca (per-tx allocator cap)
- audit_panic_log_dos.sh             — 4bb497abe (bounded panic-Log rendering)
- audit_map_key_gas.sh               — 720af8bcd (gas on ComputeMapKey)
- audit_nil_func_call.sh             — a7e4c34b0 (nil func call → Gno panic)
- audit_type_assert_nil.sh           — 6dad8e39d (nil interface type assertion → Gno panic)

All scripts use maketx run (no cur realm parameter needed — PR #5669).
Node-crash tests (nil_func_call, type_assert_nil) include a liveness check
after the rejected tx to confirm the node is still responsive.
… not runtime alloc

The fix (c98a2cdca) targets the preprocessor (MsgAddPackage type-checking phase),
not runtime allocation. make([]byte, 100M) tests the wrong code path.
New approach: deploy a 10-level struct embed chain (> cap of 8) — preprocessor
must reject it. 6-level embed (< cap) must still deploy successfully.
@louis14448 louis14448 merged commit ee1cb8d into main Jun 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant