fix(audit): add non-witness-utxo validation for psbt#471
Open
muhahahmad68 wants to merge 2 commits intobitcoindevkit:masterfrom
Open
fix(audit): add non-witness-utxo validation for psbt#471muhahahmad68 wants to merge 2 commits intobitcoindevkit:masterfrom
muhahahmad68 wants to merge 2 commits intobitcoindevkit:masterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #471 +/- ##
==========================================
- Coverage 80.21% 80.20% -0.02%
==========================================
Files 24 24
Lines 5348 5354 +6
Branches 242 243 +1
==========================================
+ Hits 4290 4294 +4
- Misses 980 981 +1
- Partials 78 79 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ValuedMammal
approved these changes
Apr 30, 2026
Collaborator
ValuedMammal
left a comment
There was a problem hiding this comment.
ACK 6b2f8ff
It'd be nice to see a test to check
get_utxo_forreturns None on txid mismatchget_utxo_forreturns None on previous_output.vout out of bounds
commit should say
fix(psbt): add non-witness-utxo validation for get_utxo_for
Collaborator
|
We need to drop the duplicate 081c3be commit from this branch that already exists on master with a different ID. |
f0fe014 to
4add4ca
Compare
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.
Description
This PR fixes a security vulnerability in
get_utxo_for()within src/psbt/mod.rs wherenon_witness_utxowas being used without verifying that its txid matches the input'sprevious_output.txid.Notes to the reviewers
Changelog notice
Fixed
non_witness_utxotxid againstprevious_output.txidinget_utxo_for()to prevent fee calculation manipulation via substitutedtransactions (fixes [psbt] Validate non_witness_utxo txid with tx input previous output #468)
Checklists
All Submissions:
just pbefore pushingNew Features:
Bugfixes: