3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-13 02:35:52 +00:00
Oscar Guindzberg 26adf68948 Limit initial size of some structures
Limits initial size of these structures:
- Inputs and Outputs in Transaction
- Transactions in Block
- Hashes in PartialMerkleeTree

The fix prevents this DoS attack:
- Somehow the attacker needs to get a p2p connection to the bitcoinj node.
- The attacker sends a tx msg that says the tx contains a trillion inputs (or a similar msg attacking any other of the structures described above).
- bitcoinj tries to instantiate an ArrayList with a size of a trillion.
OutOfMemoryError and the bitcoinj node is down.
2018-05-08 13:51:26 -03:00
..
2018-05-08 13:51:26 -03:00