AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 42 Bitcoin

serialise usb device access so the periodic enumeration cannot interrupt an operation in progress

Public commit record

What the developer wrote

Authored by Craig Raw

50/100 · Thin
serialise usb device access so the periodic enumeration cannot interrupt an operation in progress
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
The short version

What changed, and why it matters

This commit fixes a race condition in how Sparrow Wallet talks to USB hardware wallets. Previously, a background check for connected devices could run at the same time as a user action such as entering a PIN, signing a transaction, or displaying an address. That overlap could interrupt the device mid-operation, clear the PIN screen, or return confusing results. The change wraps all USB device operations with a single lock so they cannot overlap, and the periodic background check now skips its run if any device operation is already in progress.

Recommended action

Treat this as a reliability and likely security-hardening fix. Users relying on hardware wallets with Sparrow should upgrade to a release containing this commit. Developers should verify that the lock is held for the entire duration of each device interaction, including any UI prompts that occur while the lock is held, and consider whether the same issue exists across multiple Sparrow instances or other processes accessing the same USB device.

Security signals we found

01

Race condition between periodic USB enumeration and user-initiated device operations

02

Background enumeration could clear an active PIN prompt on the hardware device

03

Concurrent USB access could corrupt or abort signing, address display, or xpub retrieval

04

Addition of a global ReentrantLock to serialize all USB device operations

05

Periodic enumeration now defers when a device operation is in progress

06

isPromptActive flag management simplified and narrowed

07

Pairing dialog thread now captures DeviceException instead of throwing RuntimeException

Risk score

Why this scored 42/100

Our methodology →
Potential impact 12/30
Exploitability 8/25
Stealth signal 7/15
Affected reach 6/15
Confidence 6/10
Evidence quality 3/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.