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

Port Decompression bomb security changes from v1 #414

Merged
merged 2 commits into from
Feb 10, 2023

Conversation

nywilken
Copy link
Contributor

@nywilken nywilken commented Feb 9, 2023

This PR aims to fix #407 (reserved as CVE-2023-0475), by introducing "(de)compression" bomb mitigation options to the various decompressors provided by this package. Specifically, FileSizeLimit and FilesLimit.

  • FileSizeLimit limits the size of a decompressed file, or limits the total size of all decompressed files if dealing with an archive.
  • FilesLimit limits the number of files that are allowed to be decompressed from an archive.

These changes were ported from v1.

In addition to the security changes support for ZTSD as a supported decompressor was also ported.

Port changes from v1 #292
@nywilken nywilken force-pushed the decompression-bomb-port branch 2 times, most recently from f264204 to 6367bae Compare February 9, 2023 20:55
gcs/get_gcs.go Outdated Show resolved Hide resolved
Copy link
Contributor

@picatz picatz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

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.

3 participants