-
Notifications
You must be signed in to change notification settings - Fork 38.7k
bitcoin-tx: Fix missing range check #10106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The number of arguments is not checked MutateTxAddOutAddr(..), meaning that > ./bitcoin-tx -create outaddr= accessed the vStrInputParts vector beyond its bounds.
|
utACK 71a6133 |
|
Ugh. Needs backport to 0.14.1 |
|
I've reviewed 61a1534 and I think The check in if (vStrInputParts.size() < 2 || vStrInputParts.size() > 3)
throw std::runtime_error("TX output missing or too many separators");since I'm currently writing test cases for bitcoin-tx that test this and other errors. We should include that in this PR when it's ready. |
|
Extra testcases are here: https://github.com/jnewbery/bitcoin/commits/bitcoin_tx_input_sanitiser
|
|
Yes, it seems MutateTxAddOutAddr and MutateTxAddOutPubKey are the only ones with more than one part but not checking it. |
The number of arguments is not checked in MutateTxAddOutAddr(..), meaning
that
accessed the vStrInputParts vector beyond its bounds.