-
Notifications
You must be signed in to change notification settings - Fork 239
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
Add decompression bomb mitigation options for v1 #412
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tgross
reviewed
Feb 8, 2023
tgross
approved these changes
Feb 8, 2023
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.
LGTM
nywilken
pushed a commit
that referenced
this pull request
Feb 9, 2023
nywilken
pushed a commit
that referenced
this pull request
Feb 9, 2023
nywilken
pushed a commit
that referenced
this pull request
Feb 9, 2023
nywilken
pushed a commit
that referenced
this pull request
Feb 10, 2023
nywilken
added a commit
that referenced
this pull request
Feb 10, 2023
renovate bot
referenced
this pull request
in DelineaXPM/terraform-provider-dsv
Jan 23, 2024
…ecurity] (#61) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/hashicorp/go-getter](https://github.com/hashicorp/go-getter) | `v1.6.2` -> `v1.7.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fhashicorp%2fgo-getter/v1.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fhashicorp%2fgo-getter/v1.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fhashicorp%2fgo-getter/v1.6.2/v1.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fhashicorp%2fgo-getter/v1.6.2/v1.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | ### GitHub Vulnerability Alerts #### [CVE-2023-0475](https://nvd.nist.gov/vuln/detail/CVE-2023-0475) HashiCorp go-getter up to 1.6.2 and 2.1.1 is vulnerable to decompression bombs. Fixed in 1.7.0 and 2.2.0. --- ### Release Notes <details> <summary>hashicorp/go-getter (github.com/hashicorp/go-getter)</summary> ### [`v1.7.0`](https://github.com/hashicorp/go-getter/releases/tag/v1.7.0) [Compare Source](https://github.com/hashicorp/go-getter/compare/v1.6.2...v1.7.0) #### What's Changed - docs: provide logging recommendations by [@​mickael-hc](https://github.com/mickael-hc) in [https://github.com/hashicorp/go-getter/pull/371](https://github.com/hashicorp/go-getter/pull/371) - Update aws sdk version by [@​Jukie](https://github.com/Jukie) in [https://github.com/hashicorp/go-getter/pull/384](https://github.com/hashicorp/go-getter/pull/384) - Update S3 URL in README by [@​twelvelabs](https://github.com/twelvelabs) in [https://github.com/hashicorp/go-getter/pull/378](https://github.com/hashicorp/go-getter/pull/378) - Migrate to GHA by [@​claire-labry](https://github.com/claire-labry) in [https://github.com/hashicorp/go-getter/pull/379](https://github.com/hashicorp/go-getter/pull/379) - \[COMPLIANCE] Update MPL 2.0 LICENSE by [@​hashicorp-copywrite](https://github.com/hashicorp-copywrite) in [https://github.com/hashicorp/go-getter/pull/386](https://github.com/hashicorp/go-getter/pull/386) - remove codesign entirely from go-getter by [@​claire-labry](https://github.com/claire-labry) in [https://github.com/hashicorp/go-getter/pull/408](https://github.com/hashicorp/go-getter/pull/408) - Add decompression bomb mitigation options for v1 by [@​picatz](https://github.com/picatz) in [https://github.com/hashicorp/go-getter/pull/412](https://github.com/hashicorp/go-getter/pull/412) - v1: decompressors: add LimitedDecompressors helper by [@​shoenig](https://github.com/shoenig) in [https://github.com/hashicorp/go-getter/pull/413](https://github.com/hashicorp/go-getter/pull/413) #### New Contributors - [@​mickael-hc](https://github.com/mickael-hc) made their first contribution in [https://github.com/hashicorp/go-getter/pull/371](https://github.com/hashicorp/go-getter/pull/371) - [@​Jukie](https://github.com/Jukie) made their first contribution in [https://github.com/hashicorp/go-getter/pull/384](https://github.com/hashicorp/go-getter/pull/384) - [@​twelvelabs](https://github.com/twelvelabs) made their first contribution in [https://github.com/hashicorp/go-getter/pull/378](https://github.com/hashicorp/go-getter/pull/378) - [@​hashicorp-copywrite](https://github.com/hashicorp-copywrite) made their first contribution in [https://github.com/hashicorp/go-getter/pull/386](https://github.com/hashicorp/go-getter/pull/386) **Full Changelog**: hashicorp/go-getter@v1.6.2...v1.7.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/DelineaXPM/terraform-provider-dsv). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMzUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEzNS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andFilesLimit
.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.There are a few downsides to consider with the current approach I've taken before we merge this PR:
io.LimitReader
returns anEOF
after the configured byte limit, and doesn't seem to provide a clear "you've read past the limit" error. In certain situations, this might lead to an unintended silent error.☝️ To mitigate some of those issues, for the ZIP and TAR archives, I use the
FileInfo
in the header returned for the content to check the size before using it.