Commit message · merge-scriptMerge bitcoin/bitcoin#36262: test: cover orphan reconsideration interruptibility
16bff77a5aaf7a9740b859f74b8898cee6de5588 test: cover orphan reconsideration interruptibility (ViniciusCestarii)
Pull request description:
Add test checking that ProcessOrphanTx reconsiders at most one orphan per ProcessMessages(). This test prevents regression of [CVE-2024-52914](https://bitcoincore.org/en/2024/07/03/disclose-orphan-dos/) which currently no existing test checks.
The test kills 2 mutants found with https://github.com/ViniciusCestarii/mutant-harness:
1. Remove `return true` after an orphan is accepted
```diff
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -3494,7 +3494,6 @@ bool PeerManagerImpl::ProcessOrphanTx(Peer& peer)
if (result.m_result_type == MempoolAcceptResult::ResultType::VALID) {
LogDebug(BCLog::TXPACKAGES, " accepted orphan tx %s (wtxid=%s)\n", orphanHash.ToString(), orphan_wtxid.ToString());
ProcessValidTx(peer.m_id, porphanTx, result.m_replaced_transactions);
- return true;
} else if (state.GetResult() != TxValidationResult::TX_MISSING_INPUTS) {
```
2. Remove `return true` after an orphan is rejected for a reason other than `TX_MISSING_INPUTS`
```diff
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -3508,7 +3508,6 @@ bool PeerManagerImpl::ProcessOrphanTx(Peer& peer)
state.GetResult() != TxValidationResult::TX_RESULT_UNSET)) {
ProcessInvalidTx(peer.m_id, porphanTx, state, /*first_time_failure=*/false);
}
- return true;
}
}
```
ACKs for top commit:
instagibbs:
reACK https://github.com/bitcoin/bitcoin/pull/36262/commits/16bff77a5aaf7a9740b859f74b8898cee6de5588
fametrano:
tACK 16bff77a5aaf7a9740b859f74b8898cee6de5588
Tree-SHA512: 3d00bf7aa023c47d335b0f4c9d720c914611962272b895d91c8a542739f3b9c0d35c1dba5becdfd7167122c3f3f2be87b366d296732fa2765538467e6c0af6d7
91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queuedexplicit security languageaccess controlmerge-commit duplicate discount
AI analysis · Informational 15/100This commit only adds a new automated test to Bitcoin Core. It does not change any production code. The test verifies that a previously fixed denial-of-service bug (CVE-2024-52914) stays fixed by checking that orphan transactions are reconsidered one at a time per network message. It is a regression test, not a security patch.