Mutant created against commit 37912ec.
+1 -1 · cpp
This description is AI generated, mistakes can be made.
Intent: Use the received extension buffer rather than the snapshot+extension concatenation. Minisketch::Deserialize asserts GetSerializedSize() == obj.size(), so any extension message aborts the node. This sits between critical and high: it is a remote crash from p2p input, but only an outbound reconciliation peer can send it. It is labelled high.
Behaviour change: Original: rebuilds the 2x sketch from the stored initial sketch plus the extension and decodes. Mutant: the buffer is half the expected size, the assert in minisketch.h fires, and bitcoind aborts.
Trigger: We initiate reconciliation with an OUTBOUND_FULL_RECONCILIATION peer. Its initial SKETCH does not decode against our set (difference larger than capacity), so we send REQSKETCHEXT. The peer replies with a SKETCH carrying the high elements (any non-empty skdata). This happens to honest peers during normal operation, and a malicious outbound peer can force it at will.
Spec violation: BIP-330: the extension carries only the higher elements, and the initiator must combine them with the initial sketch to form the extended sketch.
Severity if undetected: high
Why tests miss it: src/test/txreconciliation_tests.cpp (HandleSketchTest stops at EXT_REQUESTED; no HandleSketch call in EXT_REQUESTED phase), test/functional/p2p_txrecon_initiator.py (run_test: 'TODO: Add more cases, potentially including also extensions'), no fuzz target references txreconciliation
Plausibility: skdata is the function parameter and working_skdata a local copy a few lines above, so picking the wrong one of two near-identical names is a classic slip.
Equivalence risk: None on the extension path: sizes always differ by the initial sketch length, which is non-zero because an empty initial sketch terminates early.
Commands and environment reported by the submitter
cmake -B build -DBUILD_GUI=OFF -DWITH_ZMQ=OFF -DENABLE_IPC=OFF && cmake --build build -j$(nproc)ctest --test-dir build -j$(nproc) && build/test/functional/test_runner.py -j$(nproc) --failfastmutant-harness operator: injection; location: TxReconciliationTrackerImpl::HandleSketchExtension lines 301
Imported from mutant-harness 474b4f7.
Commands are shown as text and never executed by MutantHub.
0 comments
No comments yet
Discuss equivalence, reproduction difficulties, or a test that kills this mutant.