Skip to content

Stop storing unlocked volume keys in the case file - #185

Open
deadp wants to merge 1 commit into
switch-nz:mainfrom
deadp:deadp/never-store-volume-keys
Open

deadp wants to merge 1 commit into
switch-nz:mainfrom
deadp:deadp/never-store-volume-keys

Conversation

@deadp

@deadp deadp commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

What

Unlocking a BitLocker or LUKS volume saved its volume key in the case's volume_keys table, although the README says keys are never written into the case. Anyone holding a case file could decrypt the volume.

  • Keys now live only in memory for the session (vault_cache / ev.unlocked); reopening a case means unlocking again.
  • Opening a case written by an earlier version drops volume_keys with secure_delete on, then VACUUM and a WAL checkpoint, so the key bytes do not survive in free pages or the journal. Only runs when the old table exists.
  • Test: an old-style case carrying a key is opened, and no file in the case directory contains the key bytes afterwards.

CHANGELOG entry under Unreleased / Security.

🤖 Generated with Claude Code

Each unlock saved the BitLocker/LUKS volume key in the case's volume_keys
table, contradicting the README; anyone holding a case could decrypt the
volume. Keys now stay in memory for the session. Opening an older case drops
the table with secure_delete and VACUUM so the key bytes leave the file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant