fix(evm): remove OrderDetector::selfdestruct frame pop (ENG-2293)#238
Merged
Conversation
revm's `selfdestruct` inspector hook is not a call/create frame boundary — the enclosing frame still terminates via `call_end`/`create_end`. Popping the frame stack on selfdestruct caused a double-pop and panicked in `Framed::exit_frame` on the subsequent `call_end`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
de65347 to
bfe2211
Compare
Fraser999
approved these changes
May 25, 2026
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
OrderDetector::selfdestructcalledself.exit_frame(), but revm'sselfdestructinspector hook is not a call/create frame boundary — the enclosing frame still terminates viacall_end/create_end. The double pop made the nextcall_endpanic inFramed::exit_frameatframe_boundaries.pop().unwrap().selfdestructInspector method. SELFDESTRUCT doesn't revert events emitted earlier in the frame, and the frame's normal end-of-call hook handles the pop.selfdestruct_inside_frame_does_not_unbalance_stack) coveringcall→ events →selfdestruct→call_end(success), asserting the exact frame-boundary stack (&[0]) is preserved across the selfdestruct hook.pub(crate)test-onlyFramed::frame_boundaries(&self) -> &[usize]accessor for stack introspection.Fixes ENG-2293. Reported externally as an asymmetric-DoS source-only vulnerability affecting v0.16.0, v0.18.0, v0.19.0.
Test plan
cargo test -p signet-evm orders::inspectorcargo clippy -p signet-evm --all-features --all-targets -- -D warningscargo clippy -p signet-evm --no-default-features --all-targets -- -D warningsRUSTDOCFLAGS="-D warnings" cargo doc -p signet-evm --no-deps --all-featurescargo +nightly fmt🤖 Generated with Claude Code