Skip to content

storage_cipherBlock() has the same iv/ctx scrubbing asymmetry as storage_secMigrate -- leaks the passphrase-derived authdata encryption key #575

Description

@BitHighlander

Summary

Same bug class as #574, different key. `storage_cipherBlock()` encrypts/decrypts the CTAP2/passkey authenticator block using `authdataKey` (a PBKDF2-derived 64-byte key from the user's passphrase). Encrypt branch scrubs `ctx` but leaves `iv` (which holds the raw key) unscrubbed; decrypt branch scrubs `iv` but leaves the AES key schedule in `ctx` unscrubbed.

Impact (high)

Called from `storage_getAuthData()` (every read while passphrase protection + a cached passphrase are active) and `storage_setAuthData()` (every write). Either branch leaks material sufficient to decrypt the stored authenticator block without needing the passphrase, via the same residual-stack-read attack classes as #574.

Fix direction

Scrub both `iv` and `ctx` on both branches, matching the fix direction for #574.

Metadata

Metadata

Assignees

No one assigned

    Labels

    securitySecurity-relevant defect or hardening

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions