Missing CheckMinimalPush check in MatchMultisig: largest IsStandard multisig n-of-3 is 12 bytes too large? #23285

issue practicalswift openend this issue on October 15, 2021
  1. practicalswift commented at 9:44 am on October 15, 2021: contributor

    The following four equivalent scripts all pass standardness check (IsStandard):

    • 1 0x21 0x020000000000000000000000000000000000000000000000000000000000000000 1 CHECKMULTISIG
    • 1 0x4c21 0x020000000000000000000000000000000000000000000000000000000000000000 1 CHECKMULTISIG
    • 1 0x4d2100 0x020000000000000000000000000000000000000000000000000000000000000000 1 CHECKMULTISIG
    • 1 0x4e21000000 0x020000000000000000000000000000000000000000000000000000000000000000 1 CHECKMULTISIG

    Where 0x4c == OP_PUSHDATA1, 0x4d == OP_PUSHDATA2 and 0x4e == OP_PUSHDATA4.

    Only the first one would pass the standardness check if minimal representation was enforced.

    AFAICT we check for minimal representation in all other IsStandard standardness checks. Is there any particular reason we’re not doing it for CHECKMULTISIG in MatchMultisig? :)

  2. theStack commented at 11:39 am on October 19, 2021: contributor
    Good find! As far as I can see there is no reason to not enforce minimal representation also on multisig scripts to be considered as IsStandard. Happy to open a PR which fixes (and tests) this if there are no objections.
  3. darosior commented at 9:32 am on November 11, 2021: member
    Probably want to check if some (admittedly broken) application doesn’t rely on it before tightening the rules as it’s still in use. This seems like a good place to start looking for such outputs.
  4. willcl-ark added the label Validation on Jan 16, 2026
  5. willcl-ark added the label Needs Conceptual Review on Jan 16, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-02-01 21:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me