zen icon indicating copy to clipboard operation
zen copied to clipboard

Disconnect outbound peers on the invalid chain

Open yixiao5428 opened this issue 3 years ago • 1 comments

This is a security vulnerability.

Currently, the outbound peers on incompatible chains may use up outbound connection slots (the ProcessMessage() function in src/main.cpp). If the block header is valid, but the block is known to be invalid, and the peer announces the same block as being on its active chain, the peer should be disconnected.

A possible solution is to check whether the first invalid header in mapBlockIndex is at the end, if not, disconnect the peer (after line 5758 in src/main.cpp).

Similar fix from Bitcoin: https://github.com/bitcoin/bitcoin/commit/37886d5e2f9992678dea4b1bd893f4f10d61d3ad.

Reported by 6004ed5feaa31ae9df36b5dbc60f0fa53255a5fb734334082c6d202405fc738c.

yixiao5428 avatar Jul 17 '21 09:07 yixiao5428

Hi @yixiao5428

I'm using this to respond for all the issues you've opened. First of all thank you for reporting them. We're currently focused on a major delivery of zend_oo and there is no further release planned from this repository. We will address all of the issues on the zend_oo repository in the coming weeks.

cronicc avatar Aug 03 '21 10:08 cronicc