mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 10:47:36 +00:00
test: cover orphan reconsideration interruptibility #36262
No reviewers
Labels
No labels
Android
Backport
Block storage
Brainstorming
Bug
Build system
CI failed
Consensus
Data corruption
Descriptors
Docs
DrahtBot Guix build requested
Feature
Fuzzing
GUI
Good First Review
IPC
Insufficient Review
Kernel
Linux/Unix
Mempool
Mining
Needs Backport (31.x)
Needs Backport (32.x)
Needs Benchmark
Needs Conceptual Review
Needs backport (30.x)
Needs rebase
Needs release note
Net
P2P
PSBT
Privacy
Private Broadcast
Questions and Help
RPC/REST/ZMQ
Refactoring
Resource usage
Review club
Scripts and tools
Settings
TX fees and policy
Tests
Tracking Issue
UTXO Db and Indexes
Up for grabs
Upstream
Utils/log/libs
Validation
Waiting for author
Wallet
Windows
good first issue
interfaces
macOS
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin/bitcoin!36262
Loading…
Reference in a new issue
No description provided.
Delete branch "test-orphan_reconsideration_interruptible"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add test checking that ProcessOrphanTx reconsiders at most one orphan per ProcessMessages(). This test prevents regression of CVE-2024-52914 which currently no existing test checks.
The test kills 2 mutants found with https://github.com/ViniciusCestarii/mutant-harness:
return trueafter an orphan is acceptedreturn trueafter an orphan is rejected for a reason other thanTX_MISSING_INPUTSThe following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
External sites
Reviews
See the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste
<!--meta-tag:bot-skip-->into the comment that the bot should ignore.🚧 At least one of the CI tasks failed.
Task
macOS-cross to arm64: https://github.com/bitcoin/bitcoin/actions/runs/34985864523/job/104437664650LLM reason (✨ experimental): CI failed because the build stopped on a Clang
-Wthread-safety-analysiserror (mutexg_msgproc_mutexnot held exclusively) indenialofservice_tests.cpp.Hints
Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:
Possibly due to a silent merge conflict (the changes in this pull request being
incompatible with the current code in the target branch). If so, make sure to rebase on the latest
commit of the target branch.
A sanitizer issue, which can only be found by compiling with the sanitizer and running the
affected test.
An intermittent issue.
Leave a comment here, if you need help tracking down a confusing failure.
concept ACK
Concept ACK
tACK
1ad8b857faI built
test_bitcoinat this commit and ran the new test 20 times; it passed every time and does not depend on timing. It fails with both mutants from the description, and with bothreturn trues removed together, which brings back the pre-#15644 behaviour of handling every orphan in one call. It also catches droppingif (processed_orphan) return true;inProcessMessages.One related mutant survives: removing
if (m_txdownloadman.HaveMoreWork(peer.m_id)) fMoreWork = true;fromProcessMessages. Orphan processing then starts only on the peer's next poll, up to 100 ms later. The two suggestions below kill it, and the test still passes. This is a delay, not the CVE, so it is optional.Return the result, so the test can check it when the parent is sent.
This fails if
ProcessMessagesstops signalling more work once the parent is accepted.Base:
69142eacd1374925cc9e4ea736c21fcec16307d0Head:
16bff77a5aaf7a9740b859f74b8898cee6de5588No verified findings are available from this partial review.
Review coverage was incomplete. The adversarial_glm review did not complete.
Full review report
Thanks for the suggestion. Applied on
aba1cd975cThanks for the suggestion. Applied on
aba1cd975cThanks for the reviews! Force-pushed
aba1cd975cadding the suggestions on https://github.com/bitcoin/bitcoin/pull/36262#pullrequestreview-5391424947ACK
aba1cd975cnit: you could make the children 0-fee, to avoid having to mutate scripts/witnesss
Good point, it reads cleaner. Done on
aba1cd975creACK https://github.com/bitcoin/bitcoin/pull/36262/commits/16bff77a5aaf7a9740b859f74b8898cee6de5588
Thanks @instagibbs for the review! Force-pushed
aba1cd975caddressing https://github.com/bitcoin/bitcoin/pull/36262#discussion_r4166080185tACK
16bff77a5aRe-tested: the test passes 20/20, and the
HaveMoreWorkmutant that survived before now fails atBOOST_CHECK(send_tx(parent)). With the 0-fee children, three orphans are accepted and three rejected for "min relay fee not met".