Skip to content

Commit

Permalink
kms: fix possible deadlock due to nested RLock calls. (minio#16136)
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Auernhammer <[email protected]>
  • Loading branch information
aead authored Nov 28, 2022
1 parent 09d4f8c commit 9b1e70e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/kms/kes.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,11 @@ func (c *kesClient) DecryptAll(ctx context.Context, keyID string, ciphertexts []

plaintexts := make([][]byte, 0, len(ciphertexts))
for i := range ciphertexts {
plaintext, err := c.DecryptKey(keyID, ciphertexts[i], contexts[i])
ctxBytes, err := contexts[i].MarshalText()
if err != nil {
return nil, err
}
plaintext, err := c.client.Decrypt(ctx, keyID, ciphertexts[i], ctxBytes)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 9b1e70e

Please sign in to comment.