This checklist supports proactive reviews of sandbox-critical WAMR paths. It is not the vulnerability reporting policy; see SECURITY.md for how to report security issues.
Assume attackers can provide arbitrary core WebAssembly modules, component-model binaries, exported function arguments, and guest linear-memory contents. Host applications decide which imports, WASI capabilities, preopens, sockets, HTTP clients, and resource handles are exposed; runtime code must preserve those capability boundaries.
Sandbox-critical failures include host memory access from generated native code, incorrect interpreter/AOT behavior that skips WebAssembly traps, integer overflow in guest-memory range checks, stale or confused resource handles, and incorrect canonical ABI lifting/lowering across guest memory.
Out of scope for this checklist: performance-only work, the public security advisory process, and broad fuzz-campaign operations. Fuzzing infrastructure is tracked in tests/fuzz/README.md.
Use this list when reviewing a subsystem. Mark each item as reviewed in the audit notes and record exact files/functions examined.
- Validate type, function, memory, table, global, element, data, and start section indices before runtime use.
- Check active data and element segment offsets with overflow-safe arithmetic.
- Reject negative or oversized init-expression offsets before copying into guest memory or tables.
- Preserve import type compatibility, including mutable-global invariance, function signatures, memory/table limits, and reference types.
- Ensure memory growth and shared-memory initialization keep size, capacity, waiter queues, and refcounts consistent.
- Check every memory access as
addr + offset + widthbefore slicing host memory. - Check
memory.copy,memory.fill, atomics, SIMD lane loads/stores, and bulk memory operations with overlap and overflow cases. - Check table indices, null references, dropped element/data segments, and
call_indirectsignature mismatches before dispatch. - Verify trap paths return errors or traps consistently and do not continue with partially updated state.
- Confirm frontend lowering preserves every WebAssembly trap condition for
loads/stores, atomics, memory growth/copy/fill, numeric traps, table ops,
br_table,call_indirect, and reference calls. - Review IR passes for rewrites that could move, drop, or duplicate checks on only some control-flow paths.
- Review register allocation and spilling under high register pressure, helper-call clobbers, callee-saved preservation, stack-frame layout, and multi-value returns.
- Check generated native code performs bounds checks before native memory access and uses overflow-safe effective-address formation.
- Check
VmCtxfield layout, helper pointers, table/function-pointer dispatch, global synchronization, and platform-specific trap recovery. - On platforms where in-process AOT trap recovery is unsupported, validate trap reproducers in a subprocess or sentinel harness instead of killing the test runner.
- Treat every guest pointer/length pair as untrusted and check it before reading or writing guest memory.
- Preserve preopen and path sandbox rules; reject absolute paths,
..components, Windows drive prefixes, and alternate separators where relevant. - Keep socket, HTTP, stream, descriptor, and resource tables capability-scoped; stale handles must not resolve to newly authorized resources accidentally.
- Record ownership for every resource type. Resource-drop paths must either close owned resources exactly once or intentionally no-op for borrowed adapter-owned resources.
- Default-deny outbound network/HTTP behavior unless a capability allow-list is explicitly implemented and tested.
- Check
ptr + len,ptr + offset, andptr + element_size * countwith overflow-safe host-sized arithmetic before slicing linear memory. - Validate UTF-8, UTF-16, latin1+utf16, list, string, record, tuple, variant, flags, option, result, and resource layouts before lifting/lowering values.
- Ensure allocator-owned
InterfaceValuepayloads are released exactly once on success and error paths. - Ensure canonical lower trampolines resolve the intended memory and
cabi_realloc, including alias-exported memory edge cases.
Confirmed findings should be filed as separate GitHub issues. Each issue should include:
- Affected files/functions.
- Security or correctness impact.
- Reproducer shape or regression test, when possible.
- Suggested fix direction.
- Links to any follow-up PRs or audit records.
Do not file speculative findings without code evidence or a reproducible path. Document uncertain risks as follow-up audit notes instead.
Reviewed files:
src/compiler/frontend.zigsrc/compiler/ir/analysis.zigsrc/compiler/ir/passes.zigsrc/compiler/ir/regalloc.zigsrc/compiler/codegen/aarch64/compile.zigsrc/compiler/codegen/aarch64/emit.zigsrc/runtime/aot/runtime.zig
Reviewed areas:
- Memory load/store and atomic lowering.
memory.grow,memory.copy,memory.fill,br_table,call_indirect, return-call forms, table/reference ops, and numeric traps.- CFG/liveness, SSA/mem2reg, phi placement/lowering, register allocation, clobber handling, and spill offsets.
- AArch64 memory-address formation, bounds-check branches, helper-call ABI, callee-saved/caller-saved handling, stack frame layout, table/function calls, and multi-value returns.
- AOT
VmCtxsetup, memory/table/helper pointers, trap helpers,callFuncScalarargument/result marshalling, and global synchronization.
Result: no confirmed AArch64 AOT sandbox finding in this pass.
Residual risks to test in follow-up work:
- AArch64
call_indirectandcall_reftail-call paths with multi-result signatures and fixedVmCtxoffsets. - High register-pressure code that combines helper calls, spills, phis, and memory/table checks.
- Windows-specific AOT trap-as-error recovery behavior.
Reviewed files:
src/runtime/interpreter/instance.zigsrc/runtime/interpreter/interp.zigsrc/runtime/interpreter/loader.zigsrc/runtime/common/types.zigsrc/component/instance.zigsrc/component/canonical_abi.zigsrc/component/wasi_cli_adapter.zigsrc/wasi/preview2/streams.zigsrc/wasi/preview2/sockets.zigsrc/wasi/preview2/http.zig
Confirmed finding filed separately:
- #240: canonical ABI
guest-memory range checks could overflow on wrapping
u32offsets.
Potential follow-up audit areas:
- Component memory and
cabi_reallocresolution with alias-exported memories. - WASI adapter resource-drop behavior for borrowed/preopen handles.
- Interpreter table grow/fill/copy behavior with table64 and cross-module funcref type checks.
zig build testzig build spec-tests-aotzig build fuzz(see tests/fuzz/README.md)