fix(pxe): validate a BoundedVec against its storage array on deserialization - #25035
Merged
Conversation
…ization The bounded-vec deserializer computed the storage array's capacity and then ignored it, trusting the length scalar instead. Two malformed inputs got through: a length past the capacity ran the element loop until the reader ran dry, reporting "Not enough fields to be consumed" from several frames down after Array.from had already reserved a slot per claimed element; and a storage array that was not a whole number of elements silently produced a vec with a fractional maxLength. Both now throw naming the values that disagree. Serialization already enforced the length bound, so this restores the symmetry.
nchamo
approved these changes
Jul 29, 2026
rangozd
pushed a commit
to rangozd/aztec-packages
that referenced
this pull request
Aug 5, 2026
BEGIN_COMMIT_OVERRIDE fix(pxe): validate a BoundedVec against its storage array on deserialization (AztecProtocol#25035) chore: add disclaimers on poc contracts (AztecProtocol#24975) chore: begin nr constant cleanup (AztecProtocol#25014) fix(txe): authorize sync_state utility calls in inlined contexts (AztecProtocol#25034) refactor(stdlib): a function's return type is a single optional AbiType (AztecProtocol#25066) feat(pxe): hash-pinned node read cache (AztecProtocol#24969) feat(noir-projects): publish compiled protocol artifacts to npm (AztecProtocol#25075) fix(ci): trim GitHub commit API response in upload_benchmarks to avoid E2BIG on large merge commits (AztecProtocol#25077) END_COMMIT_OVERRIDE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This just catches a misconstructred oracle call.