Skip to content

Specially crafted transactions can take more than 3 minutes to verify #2256

@SergioDemianLerner

Description

@SergioDemianLerner

Please read the following thread: https://bitcointalk.org/index.php?topic=140078.0

Also additional information was privately sent to the dev team.

My proposed solutions is:

  1. Create a Transaction hash cache to temporarily store the last used hash during the evaluation of a script.
  2. Verify that the ECDSA signature and the ECDSA public key are well-formed before hashing the transaction.
  3. Verify the length of pushed signatures of vin[i].scriptSig in CTransaction::AreInputsStandard() to see if they are long enough.
    (currently only stack.size() = (unsigned int)nArgsExpected) is tested, but not the actual arguments. )

The first 2 defense measures must be deployed together.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions