Skip to content
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

Disclosure: bitpeer module and SPV mining implementation vulnerable to DoS attacks #16

Open
0xB10C opened this issue Mar 20, 2024 · 0 comments

Comments

@0xB10C
Copy link

0xB10C commented Mar 20, 2024

Improper Input Validation in the SPV mining module of the ViaBTC mining server allows a remote attacker to waste the pools hashrate by letting it mine on an old block (i.e. DoS) by sending a modified, old block via the P2P network.

The process_block() function only checks the blocks proof-of-work, but does not check that the header's merkle-tree root matches the transactions in the block. This allows modifications to the transactions in the block. As the BIP-34 coinbase height is used to determine if the block is new, and the coinbase height can be trivially changed, the pool can be tricked into SPV mining on an old block. This is essentially a DoS. If sustained and undetected, this might result in substantial financial loss for the pool operator.

To anyone that's using this pool software: I'd recommend to not use the bitpeer module (as it's half-broken anyway: https://b10c.me/observations/10-viabtc-blocks-without-witness-data/), and generally, to consider using maintained and up-to-date pool software.

More details about the vulnerability can be found here: https://b10c.me/blog/012-viabtc-spv-vulnerability-disclosure/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant