From d00e72fed4812b5d6866dcff09e07f3fcfca7a94 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sun, 22 Oct 2023 20:24:02 +0200 Subject: [PATCH] Update klauspost/compress to fix data corruption at maximum compression --- changelog/unreleased/issue-4523 | 17 +++++++++++++++++ go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 changelog/unreleased/issue-4523 diff --git a/changelog/unreleased/issue-4523 b/changelog/unreleased/issue-4523 new file mode 100644 index 000000000..3dd4a536f --- /dev/null +++ b/changelog/unreleased/issue-4523 @@ -0,0 +1,17 @@ +Bugfix: Update zstd library to fix possible data corruption at max. compression + +In restic 0.16.0, backups using maximum compression could result in data +corruption due to a bug in the library used for compressing data. Please note +that the "auto" compression level (used by default) is not affected! + +To check a repository for data corruption, run `restic check --read-data`. This +will download and verify the whole repository. If the `check` command detects +data corruption, follow the suggested steps. To simplify the repository repair +and minimize data loss, we've also added an experimental `repair packs` command +that salvages all valid data from the affected pack files. + +Restic now uses the latest version of the library used to compress data, which +includes a fix for the data corruption issue. + +https://github.com/restic/restic/issues/4523 +https://github.com/restic/restic/pull/4530 diff --git a/go.mod b/go.mod index ca110f148..e2b859421 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/go-ole/go-ole v1.3.0 github.com/google/go-cmp v0.5.9 github.com/hashicorp/golang-lru/v2 v2.0.7 - github.com/klauspost/compress v1.16.7 + github.com/klauspost/compress v1.17.2 github.com/minio/minio-go/v7 v7.0.61 github.com/minio/sha256-simd v1.0.1 github.com/ncw/swift/v2 v2.0.2 diff --git a/go.sum b/go.sum index 2fc29bce1..195fa5d0f 100644 --- a/go.sum +++ b/go.sum @@ -122,8 +122,8 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2 github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= -github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= +github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=