Skip to content

Replication persists SigV4 transport Content-Encoding: aws-chunked in replica metadata #185

Closed

Description

@chodorenko

Expected Behavior

aws-chunked is a SigV4 streaming transport encoding and must not be persisted as object metadata. After server-side replication, the replica should preserve the source object's metadata and have no Content-Encoding when the source object had none.

Current Behavior

An object uploaded on the source with no Content-Encoding is replicated with Content-Encoding: aws-chunked.

The source has only Content-Type: application/wasm; the replica additionally has Content-Encoding: aws-chunked. Size, ETag, timestamp, and VersionID are identical.

This can make GET/HEAD responses from the replica advertise an encoding that was not applied to the stored object.

Possible Solution

The initial metadata extraction already normalizes Content-Encoding through trimAwsChunkedContentEncoding().

However, trusted replica writes subsequently call extractReplicationMetadataFromMime(), which re-copies all supportedHeaders, including the raw Content-Encoding header, and reintroduces aws-chunked.

Please either:

  • make extractReplicationMetadataFromMime() restore only replicationToInternalHeaders; or
  • apply trimAwsChunkedContentEncoding() when that helper restores Content-Encoding.

A regression test should cover a trusted replica request with Content-Encoding: aws-chunked and assert that stored replica metadata has no content-encoding.

Steps to Reproduce

  1. Configure bucket replication between two Silo deployments.
  2. Upload an object using a client/path that uses AWS SigV4 streaming payloads.
  3. Verify that the source object has no Content-Encoding.
  4. Wait for replication and run mc stat against the destination.
  5. Observe Content-Encoding: aws-chunked on the replica.

Example:

Source:
  Content-Type: application/wasm
  Replication Status: COMPLETED

Replica:
  Content-Encoding: aws-chunked
  Content-Type: application/wasm
  Replication Status: REPLICA

Context

This affects S3 clients that consume the replicated endpoint: they may attempt to decode the object using an encoding that was never applied.

Regression

Yes. The behavior appears to originate in commit 56fa63b ("fix: CVE-2026-34204 block replication metadata injection"), which introduced the post-validation replication metadata restoration path.

Your Environment

  • Version used (silo --version): RELEASE.2026-09-03T13-18-01Z
  • Server setup: two independent Silo deployments with bucket replication
  • Object type: application/wasm

Activity

  1. Vonng commented on Sep 15, 2026

    @Vonng
    Member

    Thanks for the report. This is fixed on main in PR #194, merged as 9f3037e941a4. The implementation incorporates the contribution from #187 with attribution retained.

    Replication metadata is now restored through a helper restricted to the six replication-specific fields. It preserves the normal metadata normalization step, so the transport-only aws-chunked token is no longer reintroduced into the replica's stored Content-Encoding. Regression coverage includes authenticated PUT, COPY, multipart and Snowball requests, as well as preservation of legitimate content encodings.

    This prevents new metadata pollution. Existing object versions that already contain the incorrect header are not rewritten by an upgrade. Their inventory and remediation are tracked in #201; the stored-metadata remediation notes explain the versioning and copy-related constraints.

    Availability: the fix is included in main at 40220bd836cb, but not in the latest published Server, RELEASE.2026-09-03T13-18-01Z, as of September 16. Final release acceptance remains #203.

    Documentation: Replica metadata fix and release status.

  2. moved this from Backlog to Done in Siloon Sep 15, 2026
  3. added
    bug
    on Sep 15, 2026
  4. self-assigned this
    on Sep 15, 2026
  5. added theissue type on Sep 15, 2026
  6. added this to the 20260916 milestone on Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

Projects

  • Status
    Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions