Skip to content

fix(keyexchange): zero salvage plaintext on evict (PILOT-146)#221

Merged
TeoSlayer merged 1 commit into
mainfrom
fix/pilot-146-zero-salvage-on-evict
Jun 7, 2026
Merged

fix(keyexchange): zero salvage plaintext on evict (PILOT-146)#221
TeoSlayer merged 1 commit into
mainfrom
fix/pilot-146-zero-salvage-on-evict

Conversation

@TeoSlayer

Copy link
Copy Markdown
Collaborator

Three eviction paths (aged-head trim, size bound, drain filter) now zero the plaintext bytes before dropping the slice reference.

RecordSalvage trims aged entries from the head and bounds size by
dropping the oldest, but those reslicings only move the slice header;
the backing array still holds the cleartext until GC reaches it.
Same for DrainSalvage's filter pass that drops aged entries without
returning them.

Explicitly zero each evicted entry's Plaintext bytes before the
reslice, so a heap-walking attacker or use-after-free probe can't
recover plaintext that was supposed to be ephemeral.
@TeoSlayer TeoSlayer requested a review from Alexgodoroja as a code owner June 7, 2026 00:02
@TeoSlayer TeoSlayer merged commit 8b64dbe into main Jun 7, 2026
8 checks passed
@TeoSlayer TeoSlayer deleted the fix/pilot-146-zero-salvage-on-evict branch June 7, 2026 00:03
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