Consumed bootstrap token is not zeroized in memory #73
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Info
Severity: HIGH
Attack vector: local malicious process
Impact
Allows recovery of a consumed bootstrap token from process memory, enabling later unauthorized bootstrap or registration if the token or related state remains usable.
Description
When the token is consumed, the code drops the
Stringinstead of zeroizing it. Rust's allocator does not guarantee that freed heap memory is overwritten, so the token bytes can remain in process memory until reused by a future allocation. Temporary copies are also heap-allocated and left intact.Example flow
Mitigation
Store tokens in zeroizing containers, zeroize temporary copies, and avoid returning cloned token values.