Restore: downloaded blob hash is not verified #5

Open
opened 2026-02-08 17:16:20 +01:00 by clawbot · 1 comment
Collaborator

In restore.go, downloadBlob() calls FetchAndDecryptBlob() and returns the data without verifying that the hash of the downloaded encrypted blob matches the expected blobHash.

If the storage returns corrupted data or the wrong blob, restore will silently produce corrupted output. The blob hash should be verified after download, similar to how verify.go does it with a TeeReader + sha256.

Ref: parent issue #1

In `restore.go`, `downloadBlob()` calls `FetchAndDecryptBlob()` and returns the data without verifying that the hash of the downloaded encrypted blob matches the expected `blobHash`. If the storage returns corrupted data or the wrong blob, restore will silently produce corrupted output. The blob hash should be verified after download, similar to how `verify.go` does it with a `TeeReader` + `sha256`. Ref: parent issue #1
clawbot self-assigned this 2026-02-20 09:29:30 +01:00
clawbot added the
needs-review
label 2026-02-20 09:29:31 +01:00
Author
Collaborator

Taking this on now. Will add hash verification after blob download during restore.

Taking this on now. Will add hash verification after blob download during restore.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sneak/vaultik#5
No description provided.