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

[bulk] Fix being able to Decompress large payloads #132

Merged
merged 3 commits into from
Aug 24, 2023

Conversation

Viq111
Copy link
Collaborator

@Viq111 Viq111 commented Aug 24, 2023

Contrary to Decompress, bulk.Decompress does not retry with stream decompression on failing to decompress.

#115 introduced preventing to allocate buffers that are too big when the provided compressed payload had a potentially malicious zstd buffer (i.e: zipbomb). This had the side-effect that for highly compressed payloads (> 10x), the destination buffer was still resized and would fail.

This fixes the issue and adds a test

Viq111 added 3 commits August 24, 2023 13:11
Contrary to Decompress, bulk.Decompress does not retry with stream decompression on failing to Decompress.

#115 introduced preventing to allocate too big buffers when the input zstd header was malicious. This had the side-effect that for highly compressed payloads (> 10x), the dst buffer was still resized and would fail.

This fixes the issue and adds a test
@Viq111 Viq111 merged commit 869dae0 into 1.x Aug 24, 2023
@Viq111 Viq111 deleted the viq111/bulk-fix-highlycompressed-payloads branch August 24, 2023 18:59
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.

2 participants