Skip to content

Commit

Permalink
Add crypt_safe_memcpy in reencrypt digest routine.
Browse files Browse the repository at this point in the history
We copy volume keys for purpose of calculating LUKS2
reencryption digest. Add crypt_safe_memcpy in serialization
function as well.
  • Loading branch information
oniko committed Sep 12, 2024
1 parent 41c72ea commit c0bf271
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/luks2/luks2_reencrypt_digest.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ static size_t reenc_keyslot_serialize(struct luks2_hdr *hdr, uint8_t *buffer)
static size_t blob_serialize(void *blob, size_t length, uint8_t *buffer)
{
if (buffer)
memcpy(buffer, blob, length);
crypt_safe_memcpy(buffer, blob, length);

return length;
}
Expand Down

0 comments on commit c0bf271

Please sign in to comment.