Skip to content

Fix compressed block size validation - #566

Open
fallintoplace wants to merge 1 commit into
ClickHouse:masterfrom
fallintoplace:fix/compressed-input-header-size
Open

fallintoplace wants to merge 1 commit into
ClickHouse:masterfrom
fallintoplace:fix/compressed-input-header-size

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

What

  • Reject compressed blocks smaller than the 9-byte header.

Why

  • The size comes from the wire.
  • A value below 9 underflows compressed - HEADER_SIZE.
  • This can make the payload read write past the temporary buffer.

Implementation

  • Validate the lower bound before creating the temporary buffer.
  • Add regression coverage for sizes 0, 1, and 8.

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.

1 participant