I think I found a vulnerability in the implementation of the coordinator. I'm not one hundred percent sure because I didn't test it. An attacker can exploit the vulnerability to perform a denial-of-service attack such that the current coordinator doesn't ban the attacker. Nevertheless, the attacker must posses around 10 BTC (on average) to mount the attack and the attacker may be identified (and the registered coins banned) by a retrospective analysis.
Assume that in the end of the input confirmation phase, there is a level such that there are just two Bobs (Bob1 and Bob2) participating in it and these two Bobs are controlled by the attacker. This is why the attacker needs a lot of coins because both corresponding Alices must register enough coins to participate in such a level that nobody else participates in it.
In the output registration phase, Bob1 registers his output, whereas Bob2 doesn't. In the signing phase, the coordinator builds the coinjoin transaction:
That means, that (not counting the transaction fee) the sum of the outputs of the final transaction is greater that the sum of its inputs and the difference is the denomination of the last level, and the transaction is not valid.
I didn't investigated the consequences, but the following may happens:
1) The coordinator is smart enough to realise that the transaction is not valid and throws an exception or returns an empty transaction serialisation. The attacker successfully performed a denial-of-service attack.
2) The wallet is smart enough to realise that the transaction is not valid and refuses to sign it. An attacker signs the transaction since there is no harm in signing an invalid transaction. All other participants are banned since they didn't sign the transaction. The attacker successfully performed even better denial-of-service attack since all other participants are banned.
3) All the participants (including the attacker) sign the transaction, the transaction is broadcasted but refused. The attacker successfully performed a denial-of-service attack.
I guess the case 3 occurs.
Thank you! The fix is on its way. Would you mind sending me another Bitcoin address in private so we can reward you for finding this bug?
Most helpful comment
Thank you! The fix is on its way. Would you mind sending me another Bitcoin address in private so we can reward you for finding this bug?