Skip to content

Commit c4b0c08

Browse files
committed
Update tx-size-small comment with relevant CVE disclosure
1 parent cd73721 commit c4b0c08

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/validation.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,8 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool
461461

462462
// Do not work on transactions that are too small.
463463
// A transaction with 1 segwit input and 1 P2WPHK output has non-witness size of 82 bytes.
464-
// Transactions smaller than this are not relayed to reduce unnecessary malloc overhead.
464+
// Transactions smaller than this are not relayed to mitigate CVE-2017-12842 by not relaying
465+
// 64-byte transactions.
465466
if (::GetSerializeSize(tx, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS) < MIN_STANDARD_TX_NONWITNESS_SIZE)
466467
return state.Invalid(ValidationInvalidReason::TX_NOT_STANDARD, false, REJECT_NONSTANDARD, "tx-size-small");
467468

test/functional/data/invalid_txs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ def get_tx(self):
8282
return tx
8383

8484

85+
# The following check prevents exploit of lack of merkle
86+
# tree depth commitment (CVE-2017-12842)
8587
class SizeTooSmall(BadTxTemplate):
8688
reject_reason = "tx-size-small"
8789
expect_disconnect = False

0 commit comments

Comments
 (0)