feat: guard BoundedVec oracle returns against dirty trailing storage#21589
Merged
benesjan merged 2 commits intomerge-train/fairiesfrom Mar 17, 2026
Merged
Conversation
…ng storage Add `assert_bounded_vec_trimmed` utility that asserts elements past `len()` are zeroed, and apply it to `aes128_decrypt` and `get_notes` oracle wrappers. This prevents malformed BoundedVec values from propagating through unconstrained code. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5d546d6 to
efbb2b4
Compare
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
AztecBot
pushed a commit
that referenced
this pull request
Mar 17, 2026
Collaborator
|
✅ Successfully backported to backport-to-v4-next-staging #21654. |
github-merge-queue bot
pushed a commit
that referenced
this pull request
Mar 17, 2026
BEGIN_COMMIT_OVERRIDE feat: entrypoint replay protection (#21649) feat: guard BoundedVec oracle returns against dirty trailing storage (#21589) feat: implement manual Packable for structs with sub-Field members (#21576) fix: off-by-1 in getBlockHashMembershipWitness archive snapshot (#21648) 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.

Since it will take a while for Noir to check that there are no dirty trailing elements after bvec.len() in the BVec storage array I am implementing a manual unconstrained check for this.
Summary
assert_bounded_vec_trimmedunconstrained utility inaztec-nrthat asserts all elements pastlen()in aBoundedVecare zeroedaes128_decryptandget_notesoracle calls with this guardFixes https://linear.app/aztec-labs/issue/F-455/guard-boundedvec-oracle-returns-against-dirty-trailing-storage
Test plan
🤖 Generated with Claude Code