Repository navigation
umbrella: rgw: fix AES-256-GCM key/IV reuse on multipart part re-upload - #69683
Merged
Merged
Conversation
Re-uploading the same part number in a GCM multipart upload encrypted the new data under the same key and IV as the first upload, since the IV is part_number||chunk_index and the part key came from the part number alone. GCM requires a unique IV per key; reusing one to encrypt different data weakens its confidentiality and integrity guarantees. Generate a random 16-byte salt on each UploadPart and fold it into the part key, HMAC(ObjectKey, BE32(part) || salt), so every upload gets a fresh key. The salt rides RGWUploadPartInfo, and complete stores the selected part's salt in RGW_ATTR_CRYPT_PART_NUMS, which now holds (part, salt) pairs. GET reads it back to re-derive the key, and an empty salt reproduces the old derivation so unsalted parts still decrypt. Signed-off-by: Matthew N. Heler <[email protected]> (cherry picked from commit 57e0250)
a8ed43b replaced ct_memeq with memcmp in the ISA-L GCM accelerator, making tag verification and the key-cache compare non-constant-time. Restore ct_memeq for both; the OpenSSL and EVP paths already compare in constant time. Signed-off-by: Matthew N. Heler <[email protected]> (cherry picked from commit 3a81a12)
adamemerson
approved these changes
Jun 23, 2026
Contributor
|
This PR has been added to wip-yuri8-testing-20260623.192704-umbrella. |
Contributor
|
This PR has been added to wip-yuri13-testing-20260624.215042-umbrella. |
Contributor
|
jenkins test make check |
Member
|
jenkins test make check |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
backport tracker: https://tracker.ceph.com/issues/77614
backport of #69336
parent tracker: https://tracker.ceph.com/issues/77588
this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh