-
Notifications
You must be signed in to change notification settings - Fork 18k
compress/flate: deflatefast produces corrupted output [1.15 backport] #41463
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
Labels
CherryPickApproved
Used during the release process for point releases
FrozenDueToAge
release-blocker
Milestone
Comments
Approving per discussion in a release meeting. This is a serious issue without a workaround. Only Go 1.15 needs this backport. |
Change https://golang.org/cl/266177 mentions this issue: |
Closed by merging 777e455 to release-branch.go1.15. |
gopherbot
pushed a commit
that referenced
this issue
Oct 29, 2020
The fastest compression mode can pick up a false match for every 2GB of input data resulting in incorrectly decompressed data. Since matches are allowed to be up to and including at maxMatchOffset we must offset the buffer by an additional element to prevent the first 4 bytes to match after an out-of-reach value after shiftOffsets has been called. We offset by `maxMatchOffset + 1` so offset 0 in the table will now fail the `if offset > maxMatchOffset` in all cases. Updates #41420. Fixes #41463. Change-Id: If1fbe01728e132b8a207e3f3f439edd832dcc710 GitHub-Last-Rev: 50fabab GitHub-Pull-Request: #41477 Reviewed-on: https://go-review.googlesource.com/c/go/+/255879 Reviewed-by: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Trust: Joe Tsai <thebrokentoaster@gmail.com> Trust: Matthew Dempsky <mdempsky@google.com> (cherry picked from commit ab541a0) Reviewed-on: https://go-review.googlesource.com/c/go/+/266177 Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> Trust: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
CherryPickApproved
Used during the release process for point releases
FrozenDueToAge
release-blocker
@ianlancetaylor requested issue #41420 to be considered for backport to the next 1.15 minor release.
The text was updated successfully, but these errors were encountered: