Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new(tests): EOF - EIP-7620: Dangling data in subcontainer test #812

Merged
merged 4 commits into from
Sep 18, 2024

Conversation

shemnon
Copy link
Collaborator

@shemnon shemnon commented Sep 16, 2024

Signed-off-by: Danno Ferrin danno@numisight.com

πŸ—’οΈ Description

Test dangling data inside a subcontainer

πŸ”— Related Issues

βœ… Checklist

  • All: Set appropriate labels for the changes.
  • All: Considered squashing commits to improve commit history.
  • All: Added an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.
  • Tests: All converted JSON/YML tests from ethereum/tests have been added to converted-ethereum-tests.txt.
  • Tests: A PR with removal of converted JSON/YML tests from ethereum/tests have been opened.
  • Tests: Included the type and version of evm t8n tool used to locally execute test cases: e.g., ref with commit hash or geth 1.13.1-stable-3f40e65.
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.

Test dangling data inside a subcontainer

Signed-off-by: Danno Ferrin <danno@numisight.com>
@shemnon
Copy link
Collaborator Author

shemnon commented Sep 16, 2024

Covers this fuzzing find - ipsilon/eof#146 (comment)

Signed-off-by: Danno Ferrin <danno@numisight.com>
Signed-off-by: Danno Ferrin <danno@numisight.com>
Copy link
Member

@chfast chfast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you checked if geth is failing these tests? I believe it only should fail the initcode variant.

Signed-off-by: Danno Ferrin <danno@numisight.com>
@shemnon
Copy link
Collaborator Author

shemnon commented Sep 17, 2024

Interestingly, geth only fails the (corrected) initcode form of the test, and correctly marks the runtime mode of the test as invalid.

@chfast
Copy link
Member

chfast commented Sep 17, 2024

Interestingly, geth only fails the (corrected) initcode form of the test, and correctly marks the runtime mode of the test as invalid.

This agrees with the fuzzer. I believe this is because it passes "initcode" mode to subcontainer validation and maybe this incorrectly allows additional bytes (as in create transaction).

@shemnon
Copy link
Collaborator Author

shemnon commented Sep 17, 2024

Here's the fix, explains the initcode only failure - MariusVanDerWijden/go-ethereum@4392a1c

I haven't dug in deeply but I concur with the handling hypothesis.

@marioevz marioevz changed the title Dangling data in subcontainer test new(tests): EOF - EIP-7620: Dangling data in subcontainer test Sep 18, 2024
Copy link
Member

@marioevz marioevz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@marioevz marioevz merged commit b48db3c into ethereum:main Sep 18, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants