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

bugfix: simulator crash from desynced LED pipe

Public commit record

What the developer wrote

Authored by hitechhayekian

78/100 · Adequate
bugfix: simulator crash from desynced LED pipe

The LED pipe is framed as two bytes per message, [mask, state], but the
SE1 "greenlight firmware" path (submethod 5) still wrote a single byte
left over from the old 4+4-bit protocol.

That stray byte shifts the stream by one for good: every later read(2)
straddles a message boundary and decodes garbage LED state, and the
trailing lone byte makes simulator.py's `mask, lset = c` die with
ValueError: not enough values to unpack (expected 2, got 1).

Write [mask, state] like every other caller does, and add a test that
holds all led_pipe writers to the two-byte framing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit fixes a simulator-only bug in the COLDCARD firmware's development/test tooling. A special code path that simulates the secure element's 'greenlight' LED signal was writing one byte to an internal pipe instead of the expected two bytes. That single-byte write shifted all later messages out of alignment, eventually causing the simulator to crash with a Python unpacking error. The fix changes that one write to two bytes and adds a regression test to catch similar mistakes. It does not affect real COLDCARD hardware or user funds.

Recommended action

No user action required. This is a simulator-only bugfix in development tooling. Developers should ensure the new regression test passes in CI.

Security signals we found

01

Denial-of-service condition in simulator tooling caused by malformed inter-process pipe message

02

Violation of an internal two-byte wire protocol by one caller

03

Regression test added to enforce protocol framing across all writers

Risk score

Why this scored 23/100

Our methodology →
Potential impact 4/30
Exploitability 2/25
Stealth signal 2/15
Affected reach 3/15
Confidence 8/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.