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
Fix crash in FPC codec #56795
Fix crash in FPC codec #56795
Conversation
This is an automated comment for commit fc6a25f with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page Successful checks
|
Co-authored-by: vdimir <vdimir@clickhouse.com>
…d7b4a3deb5fce173e87a33ecc64e8 Cherry pick #56795 to 23.3: Fix crash in FPC codec
…d7b4a3deb5fce173e87a33ecc64e8 Cherry pick #56795 to 23.8: Fix crash in FPC codec
…d7b4a3deb5fce173e87a33ecc64e8 Cherry pick #56795 to 23.9: Fix crash in FPC codec
…3d7b4a3deb5fce173e87a33ecc64e8 Cherry pick #56795 to 23.10: Fix crash in FPC codec
auto tail_size1 = VALUE_SIZE - zero_byte_count1; | ||
auto tail_size2 = VALUE_SIZE - zero_byte_count2; | ||
if (zero_byte_count1 > VALUE_SIZE || zero_byte_count2 > VALUE_SIZE) [[unlikely]] | ||
throw Exception(ErrorCodes::CANNOT_DECOMPRESS, "Invalid compressed data"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This causes 00002_log_and_exception_messages_formatting
to fail because of exceptions shorter than 30
check
Backport #56795 to 23.8: Fix crash in FPC codec
Backport #56795 to 23.9: Fix crash in FPC codec
Backport #56795 to 23.10: Fix crash in FPC codec
Backport #56795 to 23.3: Fix crash in FPC codec
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
The server crashed when decompressing malformed data using the
FPC
codec. This issue was found with ClickHouse Bug Bounty Program by https://twitter.com/malacupa