monad v0.16.3
show_opcodes walked the immediate region of every PUSH1..PUSH32 with an unconditional i++, bounded only by the opcode value and never by the input length. A byte stream whose final push is not followed by its full…
- A git tag with no GitHub release: it carries a commit message, not release notes.
- The newest stable release in the 0.16 line: monad v0.16.7
- A GitHub release or tag is not a deployment: what each network runs comes from the docs, below.
On the networks
| Network | Released | Note |
|---|---|---|
| mainnet | N/A | - |
| testnet | Sep 17, 2026 | - |
- Upgrade instructions for v0.16.3 (opens in a new tab), for testnet: State Archive nodes that skipped the v0.16.1 hot-fix must promote the page timeline
- The same version of the other client: monad-bft 0.16.3
Dates from the docs changelog (opens in a new tab), read Dec 5, 2026; "running now" from docs networks.json.
Tag commit message
show_opcodes walked the immediate region of every PUSH1..PUSH32 with an
unconditional i++, bounded only by the opcode value and never by the
input length. A byte stream whose final push is not followed by its full
immediate therefore read up to 32 bytes past the end of the vector's
allocation via unchecked operator[], and formatted those bytes into the
returned string. Bound the walk to the bytes actually present, and emit a
// truncated PUSHn line accounting for the shortfall; the // prefix
matches the diagnostics compile_tokens already writes in verbose mode.
A one-byte input holding a lone PUSH32 is a valid EVM program that pushes zero. Before, disassembling it printed 32 bytes of adjacent heap:
$ printf '\x7f' > push32.bin
$ parser-tool -b push32.bin
[0x0] 0x7f PUSH32
[0x1] 0x50 <- run 1: 50 92 5a bb 5c, a heap pointer
... <- run 2: d9 8a 76 f3 56, same input, ASLR-dependent
[0x10] 0x74 <- 't' stable across runs: the tail of CLI11's
[0x11] 0x20 <- ' ' "List of files to process" option help
[0x12] 0x66 <- 'f' string, still live on the heap
[0x13] 0x69 <- 'i'
[0x14] 0x6c <- 'l'
[0x15] 0x65 <- 'e'
[0x16] 0x73 <- 's'
...
[0x20] 0xd5
so the tool leaked both an ASLR-defeating pointer and unrelated heap contents into stdout. After:
$ parser-tool -b push32.bin
[0x0] 0x7f PUSH32
// truncated PUSH32: 32 of 32 immediate bytes missing (zero-padded when executed)
The only reachable path is parser-tool -b <file>
(cmd/vm/parser/parser_tool.cpp:122), which loads a file verbatim into the
vector, so the bytes are fully caller-controlled. compile_tokens is
nominally a second caller but passes the output of evm_as::compile, which
never emits a truncated push -- and discards the result besides. Nothing
on the consensus path uses this function.
A truncated immediate is not malformed input: the EVM treats the missing bytes as zero, which is why Intercode::pad reserves 32 + 1 bytes of end padding and why basic_blocks decodes immediates through the zero-filling from_bytes(n, remaining, src) overload. Those two are the execution answer; a disassembler should show what the input holds rather than the VM's interpretation of it, so the walk reports the shortfall and the message says the bytes are zero-padded when executed. Well-formed input is unaffected, and the added tests pin the existing output byte for byte.
Verified under clang-19 with the gcc-asan toolchain in Debug -- the CI matrix entry that exercises this suite -- across all 560 PUSHn by immediate-length combinations, with the push placed off offset zero so that the position-dependent term of the bound is exercised. Under that configuration the pre-fix tool aborts on the input above:
ERROR: AddressSanitizer: heap-buffer-overflow ... READ of size 1
#5 monad::vm::utils::show_opcodes(...) category/vm/utils/parser.cpp:202
#6 do_binary(...) cmd/vm/parser/parser_tool.cpp:122
#7 main cmd/vm/parser/parser_tool.cpp:160
and the fixed tool exits 0 with no sanitizer report.
The discarded show_opcodes(opcodes); at parser.cpp:243 -- compile_tokens
computes the disassembly in verbose mode and throws the string away, so
parser-tool -v has never printed the listing it promises -- is left
untouched for a separate change; [[nodiscard]] on the declaration is the
durable fix there.
Raised as EXEC-071 in the mythos-review audit batch (EXE-155).
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
0.16.3 in the docs changelog
Highlights
- State Archive nodes no longer pay 2x write amplification past MIP-8 — historical nodes commit only the page-encoded timeline after the fork, and reads route per requested block version. Archive nodes that skipped the v0.16.1 hot-fix need a one-time
monad-mpt --storage <path> --promote-secondaryafter installing; see the upgrade instructions. - Snapshot streams are versioned — every stream carries an eight-byte header, so a format mismatch aborts loudly instead of misparsing.
- Statesync protocol v0/v1 retired, leaving a single implemented protocol version.
Notable RPC/SDK changes
- [RPC] Storage encoding is routed by timeline past the MIP-8 cutoff.
TriedbEnvtracks the migration phase andprimary_earliest, soget_storage_atselects page or slot encoding according to the requested block version. - [RPC] Filter methods return
InvalidParamsfor a malformedethfilter rather than an internal error.- Ref: monad-bft PR #3241
Notable robustness changes
- [Node ops] Every snapshot stream (
eth_header,account,storage,code) is opened with an eight-byte versioned header carrying a magic, version, kind and guard byte. An unrecognised version or a shard assembled from mismatched files aborts with a clear message instead of misparsing. Snapshots produced by this release cannot be read by earlier binaries. - [EVM] Fixed a 32-byte over-read of the EVM output buffer in
mce. - [EVM] Fixed the leaf-on-branch hex-prefix in
VarLenMerkleComputeandRootVarLenMerkleCompute, which diverged from the canonical Ethereum root for a branch node carrying both children and a value. Not reachable in production: every production variable-length trie is keyed by a prefix-free set, so no committed root was affected. - [Consensus]
proposal_basicsnow finalizes in order. - [EVM] Bounded the push-immediate walk in
show_opcodes.
Notable performance changes
- [EVM] P-256 curve parameters are cached per thread in
p256_verify_impl. - [Node ops] State Archive nodes commit only the page-encoded timeline past the MIP-8 fork, removing the 2x disk growth rate that dual-timeline committing caused in v0.16.1. The RODb secondary handle also shares the primary's service thread.
Notable internal changes
- [Consensus] Statesync protocol v0 and v1 are retired and the version constants are derived from execution's
statesync_version.hthrough a newmonad-statesync-versioncrate.STATESYNC_VERSION_MINrises to v2, theStateSyncUpsertV0encoding is removed, and a peer still speaking v0 or v1 is rejected withBadVersion. - [EVM] EIP-7981 (increased access list cost) is implemented behind
eip_7981_active, which is active only for EVM revisions at or aboveMONAD_ETH_AMSTERDAM. Not reachable on any current network. - [EVM]
ethashis replaced with an in-househash256type and keccak implementation. This also corrects aSHA3_squeezearity mismatch that produced a wrong digest for every input on non-x86_64 builds. - [EVM]
silkpre_recover_addressis replaced withmonad_recover_address, and the vendored secp256k1 is linked directly. - [Node ops] Trie update statistics are made monotonic via a snapshot API.
- [EVM] The zkVM precompiles architecture is refactored.