Skip to content

Disconnect outbound peers on the invalid chain #387

@yixiao5428

Description

@yixiao5428

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: bitcoin/bitcoin@37886d5.

Reported by 6004ed5feaa31ae9df36b5dbc60f0fa53255a5fb734334082c6d202405fc738c.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions