parseMultisigRedeemScript accepted any scriptnum for m and only checked that the pubkey count matched n. A crafted redeem script with m=2^26 then made Psbt.toTx() allocate Array(m). Reject m/n that are not safe integers, outside 1..n, or above MAX_PUBKEYS_PER_MULTISIG, matching Script.multisig().
Details
- Reviewers
Fabien - Group Reviewers
Restricted Project - Commits
- rABC3b8bd3adc453: [ecash-lib] Bound multisig m to n in redeem-script parse
- cd modules/ecash-lib && npm test
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Build Bitcoin ABC Diffs / Diff Testing (ai-review) passed.
CodeRabbit Review
Diff : committed changes only
Compare : HEAD → master
Directory : work
────────────────────────────────────────
(\(\
(• .•) Sign your work. Craftsmen of an earlier age were proud to sign their work. You should be, too.
────────────────────────────────────────
Review complete
No findings ✔
2 files reviewed:
- modules/ecash-lib/src/script.test.ts
- modules/ecash-lib/src/script.ts
────────────────────────────────────────
Build Bitcoin ABC Diffs / Diff Testing (ai-review) passed.
CodeRabbit Review
Diff : committed changes only
Compare : HEAD → master
Directory : work
────────────────────────────────────────
(\(\
(• .•) 🧯 Bug extinguished.
────────────────────────────────────────
Review complete
No findings ✔
4 files reviewed:
- modules/ecash-lib/README.md
- modules/ecash-lib/package.json
- modules/ecash-lib/src/script.test.ts
- modules/ecash-lib/src/script.ts
────────────────────────────────────────