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

Merge remote-tracking branch 'agent/benma-agent/btc-prevtx-input-hash-length'

Public commit record

What the developer wrote

Authored by Marko Bencun

50/100 · Thin
Merge remote-tracking branch 'agent/benma-agent/btc-prevtx-input-hash-length'
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
The short version

What changed, and why it matters

This commit adds a safety check in the BitBox02 hardware wallet's Bitcoin transaction signing code. When the device processes a previous transaction supplied by the host computer, it now verifies that each input's previous-output hash is exactly 32 bytes long before using it. Without this check, a malformed or attacker-crafted hash of the wrong length could have been fed into the transaction hasher, potentially leading to incorrect transaction signatures or unexpected device behavior. The change is defensive and includes new tests covering hash lengths of 0, 31, and 33 bytes.

Recommended action

Treat this as a security-hardening fix and include it in the next firmware release. Review adjacent host-supplied fields in the signing flow for similar missing length or format validations. No immediate end-user action is required beyond applying the firmware update once available.

Security signals we found

01

Input-length validation added to host-supplied previous transaction data

02

New unit tests explicitly exercise malformed hash lengths (0, 31, 33)

03

Defensive hardening at the host-device trust boundary in Bitcoin signing flow

04

Potential for incorrect hashing/signature if wrong-length hash were accepted

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.