AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Moderate 59 Monero

fix: honor Require PIN after timeout on resume (CW-1707) (#3726)

Public commit record

What the developer wrote

Authored by Seth For Privacy

98/100 · Strong
fix: honor Require PIN after timeout on resume (CW-1707) (#3726)

* fix: honor Require PIN after timeout when returning from background (CW-1707)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: ignore stale requireAuth result once the app is backgrounded again

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: ask for the PIN when the last auth time can't be read (CW-1707)

On Android the secure storage read can throw: a value that fails to
decrypt comes back as a PlatformException. requireAuth() let that
escape, so the resume handler never set _requestAuth and the app came
back without the PIN. Return true instead, so every caller asks for
the PIN when the timeout can't be checked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: arm Require PIN after lock in the session a wallet is created or restored (CW-1709) (#3736)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Omar <omarh.ismail1@gmail.com>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This commit fixes a bug in Cake Wallet where the app could resume from the background without asking for the PIN, even when the user had turned on 'Require PIN after timeout.' In some cases, especially on Android, a secure-storage read error could silently prevent the lock screen from appearing. The patch makes the app ask for the PIN whenever the last-auth time cannot be read, and it also tightens the lifecycle handling so the PIN prompt is honored when returning from the background after a wallet is created or restored.

Recommended action

Users should update to the fixed build and verify that 'Require PIN after timeout' is enabled. Developers should review other lifecycle/resume paths for similar authentication-state races and ensure secure-storage failures fail-closed (require authentication).

Security signals we found

01

Authentication bypass possible when secure storage read fails

02

Lifecycle state race between resume and requireAuth() result

03

allowedCreate state could suppress PIN re-prompt on resume

04

Missing last-auth timestamp after PIN setup could cause immediate re-prompt or timing inconsistency

Risk score

Why this scored 59/100

Our methodology →
Potential impact 18/30
Exploitability 12/25
Stealth signal 8/15
Affected reach 10/15
Confidence 7/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.