M1-audit: recovery trustee gate bypassable via Approved requests from a dead setup epoch #86
Labels
No labels
epic
phase-0
phase-1
phase-2
phase-3
phase-4
phase-5
phase-6
phase-7
phase-8
phase-9
priority/P0
priority/P1
priority/P2
type/backend
type/client
type/docs
type/ops
type/security
type/spike
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/failsulit#86
Loading…
Reference in a new issue
No description provided.
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?
Completion queries (RekeyRecovery.cs:84-87, CompleteRecovery.cs:55-60) match approved requests by RequesterId+Status+expiry only — no
RecoverySetupId == setup.Id, no active-setup check. RecoverySetup rows are REUSED on re-setup (unique UserId index), keeping old trustee rows/approvals. ApproveRecoveryRequest (44-48) never checks setup.IsActive; DeleteRecoverySetup doesn't expire outstanding requests.Trigger: trustees approve → user abandons and re-setups (new KeyProof) → an attacker holding the CURRENT recovery file calls /api/recovery/rekey → trustee gate passes with zero trustee involvement in the 48h window.
Fix: tie completion to
rr.RecoverySetupId == setup.Id; addsetup.IsActivecheck in Approve/Reject; expire outstanding requests on setup delete/re-create; raise threshold handling for in-flight requests.Part of M1 closure audit #84.