fix: prevent integer overflow in e2store entry data length#18772
Closed
avorylli wants to merge 3 commits intoparadigmxyz:mainfrom
Closed
fix: prevent integer overflow in e2store entry data length#18772avorylli wants to merge 3 commits intoparadigmxyz:mainfrom
avorylli wants to merge 3 commits intoparadigmxyz:mainfrom
Conversation
mattsse
reviewed
Sep 30, 2025
Collaborator
mattsse
left a comment
There was a problem hiding this comment.
this isnt necessary, we dont expect > u32 entries here
dhyaniarun1993
pushed a commit
to op-rs/op-reth
that referenced
this pull request
Jan 14, 2026
Part of #483. First wait for theo's PR [paradigmxyz#18754](ethereum-optimism/optimism#18754) to be merged. Then wait for our PR [paradigmxyz#18772](ethereum-optimism/optimism#18772) to be merged. After that, in this repo, remove the current submodule and replace it with optimism itself.
emhane
pushed a commit
to op-rs/op-reth
that referenced
this pull request
Jan 15, 2026
Part of #483. First wait for theo's PR [paradigmxyz#18754](ethereum-optimism/optimism#18754) to be merged. Then wait for our PR [paradigmxyz#18772](ethereum-optimism/optimism#18772) to be merged. After that, in this repo, remove the current submodule and replace it with optimism itself.
emhane
pushed a commit
to op-rs/op-reth
that referenced
this pull request
Jan 20, 2026
Part of #483. First wait for theo's PR [paradigmxyz#18754](ethereum-optimism/optimism#18754) to be merged. Then wait for our PR [paradigmxyz#18772](ethereum-optimism/optimism#18772) to be merged. After that, in this repo, remove the current submodule and replace it with optimism itself.
emhane
pushed a commit
to op-rs/op-reth
that referenced
this pull request
Jan 26, 2026
Part of #483. First wait for theo's PR [paradigmxyz#18754](ethereum-optimism/optimism#18754) to be merged. Then wait for our PR [paradigmxyz#18772](ethereum-optimism/optimism#18772) to be merged. After that, in this repo, remove the current submodule and replace it with optimism itself.
emhane
pushed a commit
to op-rs/op-reth
that referenced
this pull request
Jan 29, 2026
Part of #483. First wait for theo's PR [paradigmxyz#18754](ethereum-optimism/optimism#18754) to be merged. Then wait for our PR [paradigmxyz#18772](ethereum-optimism/optimism#18772) to be merged. After that, in this repo, remove the current submodule and replace it with optimism itself.
emhane
pushed a commit
to op-rs/op-reth
that referenced
this pull request
Jan 29, 2026
Part of #483. First wait for theo's PR [paradigmxyz#18754](ethereum-optimism/optimism#18754) to be merged. Then wait for our PR [paradigmxyz#18772](ethereum-optimism/optimism#18772) to be merged. After that, in this repo, remove the current submodule and replace it with optimism itself.
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.
Fix potential integer overflow when converting usize to u32 in e2store file operations.
Changes:
Why this change is necessary:
The e2store file format specification limits entry data length to u32::MAX (4GB).
Previously, direct casting from usize to u32 could cause silent integer overflow on 64-bit systems when data.len() > u32::MAX, leading to incorrect header values and potential data corruption.