Skip to content

Deletion vector bitmap count is read from the blob and used as a loop bound without validation #3979

Description

@sungwy

DeletionVector._deserialize_bitmap reads an 8-byte count from the start of the payload and uses it directly as a loop bound, appending to a list on each iteration:

number_of_bitmaps = int.from_bytes(pl[0:8], byteorder="little")
...
for _ in range(number_of_bitmaps):
    ...
    bitmaps.append(bm)

Nothing checks the declared count against the actual payload length, so a small blob can declare a large number of bitmaps.


Issue investigation generated via claude, reviewed by Sung, Kevin, Fokko.

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions