On the 21st of September 2018, we received an encrypted message containing a (DoS) vulnerability disclosure on Particl Proof-of-Stake. After reading the very detailed notes and the scripts, we concluded that we were likely affected and commenced an internal investigation to both verify and resolve the issues.

Vulnerability Has Been Fixed

Mitigations were added by Tecnovert on September 22 in this commit

And released as part of on October 4


All fixes only apply if the node is not in InitialBlockDownload:

  • On incoming headers (AcceptBlockHeader):
    1. Add new bit BLOCK_ACCEPTED to nFlags on CBlockIndex.
    2. Add hash and time received to a new map (mmaplooseheaders) on CNodeState Set BLOCKACCEPTED flag once AcceptBlock completes Only write CBlockIndex to disk with BLOCK_ACCEPTED set. (if !IsInitialBlockDownload)
  • In AcceptBlockHeader→AddNodeHeader process CNode::mmaplooseheaders Too many or any over time+MAXDELAY → Misbehaving Remove entry from mmaplooseheaders when BLOCKACCEPTED has been set in AcceptBlock
  • Blocks might be received out of order. A block received before it's hashPrevBlock can't validate the stake kernel
  • In AcceptBlock if index→pprev→bnStakeModifier.IsNull() Put the incoming block in a list and delay processing it until it's prevblock is received.
  • Process list of delayed blocks at the end of ProcessNewBlock
    1. List too long → MisBehaving
    2. Entry been in list too long → MisBehaving
    3. Process any blocks in the list where hashPrevBlock has arrived

    Bad peers sending multiple copies of valid data is mitigated by CNodeState::mduplicatecount