diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-06-03 07:23:10 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-06-03 07:23:41 -0400 |
commit | 0f55294cc165e52a87657d7b77614b27c996d638 (patch) | |
tree | 9a2e1e86c83a960fb8c8b954dea79f8a09574709 /src/bitcoin-cli.cpp | |
parent | 42065518d937e036cce6b0ad21890f8fc2c50cfc (diff) | |
parent | fab860aed4878b831dae463e1ee68029b66210f5 (diff) |
Merge #18875: fuzz: Stop nodes in process_message* fuzzers
fab860aed4878b831dae463e1ee68029b66210f5 fuzz: Stop nodes in process_message* fuzzers (MarcoFalke)
6666c828e072a5e99ea0c16394ca3e5b9de07409 fuzz: Give CNode ownership to ConnmanTestMsg in process_message fuzz harness (MarcoFalke)
Pull request description:
Background is that I saw an integer overflow in net_processing
```
#30629113 REDUCE cov: 25793 ft: 142917 corp: 3421/2417Kb lim: 4096 exec/s: 89 rss: 614Mb L: 1719/4096 MS: 1 EraseBytes-
net_processing.cpp:977:25: runtime error: signed integer overflow: 2147483624 + 100 cannot be represented in type 'int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior net_processing.cpp:977:25 in
net_processing.cpp:985:9: runtime error: signed integer overflow: -2147483572 - 100 cannot be represented in type 'int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior net_processing.cpp:985:9 in
```
Telling from the line numbers, it looks like `nMisbehavior` wrapped around.
Fix that by calling `StopNodes` after each exec, which should clear the node state and thus `nMisbehavior`.
ACKs for top commit:
practicalswift:
ACK fab860aed4878b831dae463e1ee68029b66210f5
Tree-SHA512: 891c081d5843565d891aec028b6c27ef3fa39bc40ae78238e81d8f784b4d4b49cb870998574725a5159dd03aeeb2e0b9bc3d3bb51d57d1231ef42e3394b2d639
Diffstat (limited to 'src/bitcoin-cli.cpp')
0 files changed, 0 insertions, 0 deletions