Repository navigation
fix(execution): bound large-value reads by their declared size - #10322
Merged
Merged
Conversation
A large-array manifest is admitted by the sum of its chunk refs' declared sizes, but per-chunk reads never tied the real stored or cached bytes to that size. Sandbox code could repeat one real chunk ref with size 1 and force the host to materialize far past the inline cap. - Cap storage downloads at ref.size and reject anything larger - Refuse cached values larger than the ref claims - Cache storage reads by measured bytes, not the caller's declared size
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
[Medium impact] The PR appears safe to merge. SummaryLarge-value reads now enforce the size declared by the reference.
No new actionable issues found. Tests were not run during this review. Reviews (2) · Last reviewed commit: "test(execution): align large-value fixtu..." · Reviewed by Greptile |
Collaborator
Author
Collaborator
Author
|
@cubic-dev-ai review this PR |
Contributor
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
This branch was previously deployed
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.
Summary
size, but per-chunk reads never tied the real bytes to that size, so sandbox code could repeat one real chunk ref withsize: 1and make the host materialize far past the inline cap (viasim.values.readArrayor a loop/parallel collection)ref.sizeand reject anything largerType of Change
Testing
large-array-manifest.test.ts(forged download, forged cache hit) andstore.test.ts(measured-bytes caching); each goes red with its guard revertedlib/execution/payloads,executor/utils,executor/variables,lib/function-execution,lib/memory,lib/logs/executionsuites passChecklist
test-auditauthoring gate)