[CLEAN] 6 UTXO Security Vulnerabilities + PoC Tests (Supersedes #4014 & #3935)#4036
Closed
BossChaos wants to merge 2 commits intoScottcjn:mainfrom
Closed
[CLEAN] 6 UTXO Security Vulnerabilities + PoC Tests (Supersedes #4014 & #3935)#4036BossChaos wants to merge 2 commits intoScottcjn:mainfrom
BossChaos wants to merge 2 commits intoScottcjn:mainfrom
Conversation
Critical: - _allow_minting bypass (coinbase can mint arbitrary tokens) - TOCTOU double-spend (race condition in UTXO consumption) High: - Coinbase cap overflow (no per-block minting limit) - tx_id collision (fee not included, allows output substitution) Medium: - Missing box_id validation (invalid inputs accepted) - Dust output attack (storage bloat) Tests: 16 pass + 1 expected fail (PoC) Signed-off-by: BossChaos <bosschaos@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is a clean, focused PR containing ONLY the UTXO vulnerability tests and minimal fixes. It supersedes #4014 and #3935 to avoid review noise and overlap confusion.
Vulnerabilities Covered (Bounty #2819)
_allow_mintingbypasstest_allow_minting_bypasstest_toctou_double_spendtest_coinbase_cap_overflowtest_tx_id_fee_collisiontest_missing_box_id_validationtest_dust_output_attackFiles Changed
node/utxo_db.py: 1-line fix (include fee in tx_id)tests/test_utxo_bounty_vulnerabilities.py: 699 lines, 16 pass + 1 expected failNote
Wallet:
RTC6d1f27d28961279f1034d9561c2403697eb55602