rustic_core icon indicating copy to clipboard operation
rustic_core copied to clipboard

Add padding blob to data packs to mitigate chunking attacks

Open aawsome opened this issue 6 months ago • 1 comments

see e.g. https://github.com/rustic-rs/rustic/discussions/1439 This also introduces the repository config option use-pack-padding which allows to disable the padding.

As a side-effect currently wrong statistics (data added to blobs in stats was without pack header) has been corrected.

depends on #409

aawsome avatar Jun 28 '25 05:06 aawsome

Codecov Report

:x: Patch coverage is 64.22287% with 122 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 44.0%. Comparing base (64d052d) to head (7738b70). :warning: Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
crates/core/src/blob/repopacker.rs 61.3% 53 Missing :warning:
crates/core/src/commands/prune.rs 64.4% 32 Missing :warning:
crates/core/src/blob/packer.rs 72.7% 12 Missing :warning:
crates/core/src/blob/pack_sizer.rs 65.0% 7 Missing :warning:
crates/core/src/commands/repair/index.rs 0.0% 6 Missing :warning:
crates/core/src/index/indexer.rs 89.2% 3 Missing :warning:
crates/core/src/backend/decrypt.rs 33.3% 2 Missing :warning:
crates/core/src/commands/copy.rs 0.0% 2 Missing :warning:
crates/core/src/commands/merge.rs 0.0% 2 Missing :warning:
crates/core/src/commands/repair/snapshots.rs 0.0% 2 Missing :warning:
... and 1 more
Additional details and impacted files
Files with missing lines Coverage Δ
crates/core/src/archiver/file_archiver.rs 63.1% <100.0%> (ø)
crates/core/src/archiver/tree_archiver.rs 69.7% <100.0%> (ø)
crates/core/src/backend.rs 54.6% <ø> (+1.3%) :arrow_up:
crates/core/src/blob.rs 81.8% <ø> (+1.8%) :arrow_up:
crates/core/src/chunker.rs 50.5% <ø> (ø)
crates/core/src/commands/config.rs 35.8% <100.0%> (+0.8%) :arrow_up:
crates/core/src/repofile/configfile.rs 47.0% <100.0%> (-5.9%) :arrow_down:
crates/core/src/repofile/packfile.rs 63.4% <ø> (-5.7%) :arrow_down:
crates/core/src/archiver.rs 57.6% <66.6%> (-2.1%) :arrow_down:
crates/core/src/backend/decrypt.rs 48.1% <33.3%> (+0.2%) :arrow_up:
... and 9 more

... and 19 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Jul 02 '25 10:07 codecov[bot]