You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
UploadPart requires a per-part checksum header that AWS S3 computes server-side #46
UploadPart on a multipart upload that declared a checksum algorithm should succeed even
when the request carries no x-amz-checksum-* header. AWS S3 computes the part checksum
server-side using the algorithm recorded at CreateMultipartUpload; supplying it is a
client-side integrity option, not a requirement.
Current Behavior
If CreateMultipartUpload declared x-amz-checksum-algorithm, every subsequent UploadPartmust carry a matching x-amz-checksum-* header, or the request is rejected:
Clients that do not attach per-part checksums cannot use checksum-enabled multipart uploads
at all. Most notably this includes any AWS SDK configured with request_checksum_calculation = when_required (the default is when_supported, which does
attach them), and any SDK or hand-rolled client that only sets the algorithm at initiation.
Note this is not the same defect as #31. #31 was about the completion body and is
fixed; this one is about upload. A client hitting this gets InvalidArgument rather than InvalidPart, but is equally unable to upload.
Possible Solution
Have the server compute the part checksum with the upload's declared algorithm when the
client does not supply one, and keep validating the client-supplied value when it is
present. This requires wiring the multipart upload's checksum type into the part reader in PutObjectPartHandler rather than relying on hash.Reader.AddChecksum picking it up from
request headers.
Context
Found while root-causing #31. Verified by an API-level probe issuing UploadPart with no
checksum header against both backends.
and never calls AddChecksum, so r.ContentCRCType() is ChecksumNone by the time PutObjectPart performs its checksum missing, want %q, got %q check. There is no request
header a client could add to satisfy it — UploadPartCopy has no request body to checksum —
so for a copy-based part this is unconditionally fatal, whereas UploadPart at least has a
workaround (send the header).
Any fix here has to cover both handlers.
2. The fix is not the same for both checksum types
The observation in the issue body holds for both types — AWS's UploadPart reference
documents x-amz-checksum-* as "This header can be used as a data integrity check",
its sample request carries no checksum header at all, and the response header is documented
as "only be present if the checksum was provided in the request". So AWS does not reject a
part that omits it, for either type.
But the remedy differs, and a naive relaxation would break composite uploads:
FULL_OBJECT — the server can compute the part checksum with the upload's algorithm and
merge it; nothing else needs to change.
COMPOSITE — the completion body must still carry a checksum for every part
(InvalidRequest on AWS if one is missing), so simply dropping the UploadPart check
would move the failure to completion time rather than fix it. The server has to record the
computed part checksum so ListParts can hand it back and completion can validate it.
Whoever picks this up should treat them as two cases, not one flag.
Triage note: this report and the related multipart-checksum conformance issues (#47, #48, #50) are batched as one work item, targeted at an early follow-up release after RELEASE.2026-08-06. The rebrand release intentionally froze S3-visible behavior at its acceptance-tested baseline, so none of these changes ride along with it. Given the UploadPartCopy finding above affects default SDK checksum flows, this batch sits at the top of the post-release queue.
FULL_OBJECT — the server can compute the part checksum with the upload's algorithm and
merge it; nothing else needs to change.
When FULL_OBJECT is used, is the full-object checksum currently computed from the parts checksum ? Or is it computed on the assembled part data ? If it's the latter, a quick fix would be to not check the part checksums if the mode is FULL_OBJECT. Computing and storing the part checksums server-side and combining them could be done as a second step.
At least this would make FULL_OBJECT work correctly without part checksum client computation.
@cbornet Thank you for raising this point. The full-object checksum is computed from the stored part checksums; completion does not re-read the assembled object data.
CompleteMultipartUpload requires the checksum stored in each ObjectPartInfo. For FULL_OBJECT, it combines those values with Checksum.AddPart; if a part checksum is absent, completion fails with InvalidPart.
Therefore, skipping only the upload-time check would defer the failure to completion. The selected fix computes and persists the missing part checksum during UploadPart and UploadPartCopy, while client-supplied checksums remain authoritative and continue to be validated.
The fix has been implemented locally in 7fea6d5a5 and is pending push and remote CI.
Client-supplied part checksums are validated and stored as before.
When the client omits the checksum, SILO computes it over the logical plaintext stream before compression or encryption and stores it in the existing part metadata.
A normal UploadPart returns a checksum only when the client supplied one.
UploadPartCopy returns the server-computed checksum in CopyPartResult.
FULL_OBJECT CRC checksums and COMPOSITE CRC/SHA checksums are covered.
No on-disk format change or completion-time second read is required.
The implementation has been verified on the single-drive and erasure backends, including compression, encryption, SSE-C, SSE-S3, ranged copies, multipart merging, zero-length parts, and part replacement. The full test suite, race tests, vet, lint, and compatibility guard pass.
Related but independent paths remain tracked in #63 and #64.
Conclusion: the implementation addresses the compatibility defect reported here. This issue will remain open until the commit is pushed and remote CI completes successfully.
Resolved on main by 7fea6d5a5. UploadPart and UploadPartCopy now accept omitted optional per-part checksum headers, compute and persist the checksum server-side, and continue to validate client-supplied values. The latest main Go CI and VulnCheck runs are green. Federation-specific behavior remains tracked in #64, and this fix has not yet shipped in a tagged release. Closing as completed.
Activity
Vonng commentedon Jul 29, 2026
Follow-up after an independent audit of this report. Two corrections/additions.
1.
UploadPartCopyis broken the same way — this widens the issueupload_part_copyfails on any checksum-enabled multipart upload, not justUploadPart.Verified against a running server with boto3 1.43.58:
Same root cause, one layer up:
CopyObjectPartHandlerbuilds its reader withand never calls
AddChecksum, sor.ContentCRCType()isChecksumNoneby the timePutObjectPartperforms itschecksum missing, want %q, got %qcheck. There is no requestheader a client could add to satisfy it —
UploadPartCopyhas no request body to checksum —so for a copy-based part this is unconditionally fatal, whereas
UploadPartat least has aworkaround (send the header).
Any fix here has to cover both handlers.
2. The fix is not the same for both checksum types
The observation in the issue body holds for both types — AWS's
UploadPart reference
documents
x-amz-checksum-*as "This header can be used as a data integrity check",its sample request carries no checksum header at all, and the response header is documented
as "only be present if the checksum was provided in the request". So AWS does not reject a
part that omits it, for either type.
But the remedy differs, and a naive relaxation would break composite uploads:
merge it; nothing else needs to change.
(
InvalidRequeston AWS if one is missing), so simply dropping theUploadPartcheckwould move the failure to completion time rather than fix it. The server has to record the
computed part checksum so
ListPartscan hand it back and completion can validate it.Whoever picks this up should treat them as two cases, not one flag.
Vonng commentedon Aug 6, 2026
Triage note: this report and the related multipart-checksum conformance issues (#47, #48, #50) are batched as one work item, targeted at an early follow-up release after RELEASE.2026-08-06. The rebrand release intentionally froze S3-visible behavior at its acceptance-tested baseline, so none of these changes ride along with it. Given the
UploadPartCopyfinding above affects default SDK checksum flows, this batch sits at the top of the post-release queue.cbornet commentedon Aug 19, 2026
When
FULL_OBJECTis used, is the full-object checksum currently computed from the parts checksum ? Or is it computed on the assembled part data ? If it's the latter, a quick fix would be to not check the part checksums if the mode isFULL_OBJECT. Computing and storing the part checksums server-side and combining them could be done as a second step.At least this would make
FULL_OBJECTwork correctly without part checksum client computation.Vonng commentedon Aug 24, 2026
@cbornet Thank you for raising this point. The full-object checksum is computed from the stored part checksums; completion does not re-read the assembled object data.
CompleteMultipartUploadrequires the checksum stored in eachObjectPartInfo. ForFULL_OBJECT, it combines those values withChecksum.AddPart; if a part checksum is absent, completion fails withInvalidPart.Therefore, skipping only the upload-time check would defer the failure to completion. The selected fix computes and persists the missing part checksum during
UploadPartandUploadPartCopy, while client-supplied checksums remain authoritative and continue to be validated.Vonng commentedon Aug 24, 2026
Implementation status:
The fix has been implemented locally in
7fea6d5a5and is pending push and remote CI.UploadPartreturns a checksum only when the client supplied one.UploadPartCopyreturns the server-computed checksum inCopyPartResult.FULL_OBJECTCRC checksums andCOMPOSITECRC/SHA checksums are covered.The implementation has been verified on the single-drive and erasure backends, including compression, encryption, SSE-C, SSE-S3, ranged copies, multipart merging, zero-length parts, and part replacement. The full test suite, race tests, vet, lint, and compatibility guard pass.
Related but independent paths remain tracked in #63 and #64.
Conclusion: the implementation addresses the compatibility defect reported here. This issue will remain open until the commit is pushed and remote CI completes successfully.
fix: compute multipart part checksums server-side
Vonng commentedon Aug 25, 2026
Resolved on main by 7fea6d5a5. UploadPart and UploadPartCopy now accept omitted optional per-part checksum headers, compute and persist the checksum server-side, and continue to validate client-supplied values. The latest main Go CI and VulnCheck runs are green. Federation-specific behavior remains tracked in #64, and this fix has not yet shipped in a tagged release. Closing as completed.
cbornet commentedon Aug 25, 2026
Awesome! Can't wait to test that on a release !