Skip to content

buildParseMetaV2 can write one item past the end of the items region #143

Description

@thedavidmeister

In buildParseMetaV2's write loop a word's probe can walk past the last populated layer. expansions[s] is zero there, so pos collapses to cumulativePos, which points one item past the end of the items region, and the mload/mstore at that position touch memory beyond the bytes array.

Reaching it requires an earlier-indexed word to take a later word's layer slot, so it is not easy to hit from a random word set. It would surface as InvalidParseMeta or a lookup failure, never as DuplicateFingerprint.

Found while bounding the DuplicateFingerprint fuzz flake on main; deliberately not folded into that change, which touches no production code.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions