fix(security): drop the biometric blob when the OS reports no enrolled biometric [PERA-4702] - #1092
fix(security): drop the biometric blob when the OS reports no enrolled biometric [PERA-4702]#1092yasin-ce wants to merge 3 commits into
Conversation
47a6d7e to
7d2a7ad
Compare
|
QA'd this on Android — blob-clearing works, but two gaps before this closes PERA-4702:
Suggest either folding in the keystore binding, or rescoping this to "foreground reconcile + toggle sync" and keeping the revocation vuln open under PERA-4424 — right now the wording reads as if revocation is fully handled. |
…d biometric [PERA-4702]
7d2a7ad to
4980d8d
Compare
… a revoked blob [PERA-4702]
Description
checkBiometricsEnablednow reconciles instead of only reading: when the stored biometric blob exists but the OS reports no enrolled biometric, the blob is deleted and the answer isfalse.refreshBiometricsBindingroutes through that same check rather than a barehasSecret, so a PIN change cannot rewrite a blob whose OS enrollment is already gone.Related Issues
Checklist
Additional Notes
The threat this closes: the blob is the app's only record that biometric unlock was opted into, so one that outlives its enrollment silently re-arms unlock the moment the user enrols a new biometric — a fingerprint added after the fact could open the wallet without the in-app toggle ever being touched. The PIN record is a separate secret, so dropping the blob never costs access.
The second commit documents the side effect on the hook's return type rather than renaming the method:
checkBiometricsEnabledhas ~8 call sites and a dozen test doubles, and a rename would have buried a 60-line security fix in mechanical churn. Happy to rename in a follow-up if you would rather the name carried it.One thing worth a reviewer's eye: if
removeSecretthrows, this now rejects rather than returningfalse, so a caller expecting a boolean on the fail-closed path gets a rejection instead. I have not audited every call site for that.