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

wire: refactor handle_message, enable all message tests for libjade

Public commit record

What the developer wrote

Authored by Jon Griffiths

83/100 · Strong
wire: refactor handle_message, enable all message tests for libjade

Require any candidate message be a valid map up-front since this is a
prerequisite for the message to be a valid RPC message.

Ignore reject_incomplete which will be removed in an upcoming commit.

Note we continue to attempt to parse including new data that has arrived
after the timeout before discarding stale data.
✓ Specific, 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 refactors the code that reads incoming messages on a Blockstream Jade hardware wallet. The main change is that the device now checks up-front whether incoming bytes form a valid CBOR 'map' (a structured data format) before treating them as a real RPC command. It also changes how stale or oversized data is rejected. The commit message and diff do not claim to fix a specific security bug, but the refactor tightens input validation and removes some timeout-driven rejection logic. The test changes enable previously skipped message tests for the 'libjade' build.

Recommended action

Treat this as a hardening/refactor commit rather than a confirmed vulnerability fix. Review the new stale-data logic to ensure an attacker cannot use the timeout behavior to slip malformed bytes past validation, and verify that ignoring reject_incomplete does not break any security-critical callers. Run the newly enabled libjade negative tests and fuzz the message boundary cases (truncated, oversized, stale-prefix followed by valid message).

Security signals we found

01

Input validation tightened: candidate messages must now be valid CBOR maps before RPC processing

02

Stale-data handling changed: timeout now triggers rejection of only the pre-existing stale bytes, not necessarily the new data

03

Maximum-size buffer behavior changed: full buffer that still cannot be parsed is rejected entirely

04

reject_incomplete parameter is now ignored, altering caller-intended incomplete-message behavior

05

Tests for malformed/random inputs are enabled for libjade, suggesting the refactor is meant to make that path safer

Risk score

Why this scored 37/100

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