zen icon indicating copy to clipboard operation
zen copied to clipboard

Do not connect a corrupted block

Open yixiao5428 opened this issue 3 years ago • 0 comments

This is a security vulnerability.

In the ConnectBlock() function of src/main.cpp, it misses the check for whether the block is corrupted or not. If the block is corrupted, it should be abort immediately, otherwise it will repeat trying to connect the corrupted block.

A possible solution is to add a corruption check inner the if statement of line 2341 in src/main.cpp.

Similar fix from Bitcoin: https://github.com/bitcoin/bitcoin/commit/0e7c52dc6cbb8fd881a0dd57a6167a812fe71dc4.

Reported by 6004ed5feaa31ae9df36b5dbc60f0fa53255a5fb734334082c6d202405fc738c.

yixiao5428 avatar Jul 17 '21 09:07 yixiao5428