Summary
The Bitcoin signing path validates 1 <= m <= n <= 15 for multisig inputs, but not for multisig outputs. A host can submit a PAYTOMULTISIG internal/change output with m > n; the firmware derives the output and signs a transaction paying to an impossible quorum.
Found while auditing PR #604 at exact head 1d446ccbc9cf32a6e499990e65bcf7b358f1325b (release/7.14.3-bitcoin-only against fork develop).
Evidence
lib/firmware/signing.c:845-857 correctly rejects invalid input quorums.
lib/firmware/signing.c:907-967 validates output field/script compatibility but never validates multisig.m, pubkeys_count, or m <= n.
lib/firmware/transaction.c:617-645 and :648-680 accept m and n independently in 1..15, then compile/hash OP_m <keys> OP_n OP_CHECKMULTISIG; neither rejects m > n.
lib/firmware/transaction.c:527-553 deliberately skips the internal-transfer address/path screen for PAYTOMULTISIG, so the invalid change destination is not independently disclosed as an address.
Impact
High — loss of funds. A malicious or compromised host can label the output as internal change and obtain a valid signature for a transaction whose change is locked to an unsatisfiable multisig quorum.
Acceptance criteria
Summary
The Bitcoin signing path validates
1 <= m <= n <= 15for multisig inputs, but not for multisig outputs. A host can submit aPAYTOMULTISIGinternal/change output withm > n; the firmware derives the output and signs a transaction paying to an impossible quorum.Found while auditing PR #604 at exact head
1d446ccbc9cf32a6e499990e65bcf7b358f1325b(release/7.14.3-bitcoin-onlyagainst forkdevelop).Evidence
lib/firmware/signing.c:845-857correctly rejects invalid input quorums.lib/firmware/signing.c:907-967validates output field/script compatibility but never validatesmultisig.m,pubkeys_count, orm <= n.lib/firmware/transaction.c:617-645and:648-680acceptmandnindependently in1..15, then compile/hashOP_m <keys> OP_n OP_CHECKMULTISIG; neither rejectsm > n.lib/firmware/transaction.c:527-553deliberately skips the internal-transfer address/path screen forPAYTOMULTISIG, so the invalid change destination is not independently disclosed as an address.Impact
High — loss of funds. A malicious or compromised host can label the output as internal change and obtain a valid signature for a transaction whose change is locked to an unsatisfiable multisig quorum.
Acceptance criteria
has_m && 1 <= m <= pubkeys_count <= 15.m=0,n=0,m>n, and values above 15 on both external and internal outputs.