Skip to content

Harden transaction and parser validation - #1345

Merged
NicolasDorier merged 6 commits into
masterfrom
fix/audit-validation-bugs
Sep 30, 2026
Merged

NicolasDorier merged 6 commits into
masterfrom
fix/audit-validation-bugs

Conversation

@NicolasDorier

@NicolasDorier NicolasDorier commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Require the correct direct-push opcode before classifying and extracting pay-to-pubkey scripts.
  • Reject zero-valued PSBTv2 required-height locktimes and incompatible input locktime requirements.
  • Validate PSBTv2 output amounts against the consensus money range.
  • Preserve nLockTime as the fallback locktime when converting PSBTv0 to PSBTv2.
  • Correct Money.Bits to use 100 satoshis per bit.
  • Reject Segwit and P2SH-Segwit destinations generated from uncompressed public keys.
  • Correct fork-ID sighash comparison so distinct sighash modes are not treated as equivalent.
  • Evaluate Transaction.IsFinal(ChainedBlock) against the previous block median time past.
  • Return a consistent recovery failure instead of dereferencing null for invalid legacy compact signatures.
  • Reject valid-checksum Bech32 witness encodings with an empty payload using FormatException.
  • Parse KeyPath strings incrementally and stop at the 255-index limit.
  • Reject unsupported AssetMoney divisibility before power-of-ten arithmetic can overflow.
  • Reject off-curve affine coordinates in ECPubKey.TryCreateRawFormat.

@NicolasDorier
NicolasDorier merged commit 595d5b6 into master Sep 30, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant