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

Merge pull request #698 from Foundation-Devices/SFT-8167-sighash-per-input-type

Public commit record

What the developer wrote

Authored by mjg-foundation

73/100 · Adequate
Merge pull request #698 from Foundation-Devices/SFT-8167-sighash-per-input-type

SFT-8167 SFT-8168: validate sighash types per input type
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit tightens how the Passport hardware wallet checks the 'sighash' flag for each transaction input based on the input type (old-style, SegWit, or Taproot). It also fixes a crash where a bare assertion with no message would make signing fail silently. The change is defensive: it rejects unsupported sighash combinations earlier and makes sure the digest the device signs matches the type recorded in the signature. This reduces the chance that a malicious or malformed PSBT could trick the wallet into signing something different from what it displays.

Recommended action

Treat this as a security-hardening fix and include it in the next firmware release. Run the new psbt_sighash unit tests on device and in CI. Review whether any external wallet software relies on previously accepted but now-rejected sighash combinations, and document the supported types clearly in release notes.

Security signals we found

01

Per-input-type sighash validation reduces the attack surface for type confusion

02

Legacy sighash preimage now commits to the actual sighash type instead of a hardcoded SIGHASH_ALL value

03

Assertions in sighash builders now carry explanatory messages to avoid silent failures

04

New independent unit tests cross-check digests and signatures against pure-Python BIP-340/341 reimplementations

05

Fixes potential crash on bare AssertionError with empty args during PSBT signing

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.