diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-09-09 10:27:36 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-09-09 10:27:39 +0200 |
commit | eb1f5706dfd51cb61491aba887b5b8b9dce396f6 (patch) | |
tree | 61e269cf1cc1db3dd964281452c8c9d6ee465d53 | |
parent | 17e27dd000cccea6f8dedc004d14775498cafe03 (diff) | |
parent | facb534c37725ca446fd56d781b70ba26508bd2a (diff) |
Merge bitcoin/bitcoin#22925: test: Add missing suppression signed-integer-overflow:addrman.cpp
facb534c37725ca446fd56d781b70ba26508bd2a test: Add missing suppression signed-integer-overflow:addrman.cpp (MarcoFalke)
Pull request description:
Steps to reproduce:
[crash-d5f88bd8d0d460ffbab217b856b8582600c00503.log](https://github.com/bitcoin/bitcoin/files/7130854/crash-d5f88bd8d0d460ffbab217b856b8582600c00503.log)
```
$ FUZZ=addrman ./src/test/fuzz/fuzz ./crash-d5f88bd8d0d460ffbab217b856b8582600c00503.log
INFO: Running with entropic power schedule (0xFF, 100).
INFO: Seed: 1257085025
INFO: Loaded 1 modules (379531 inline 8-bit counters): 379531 [0x562577b768a8, 0x562577bd3333),
INFO: Loaded 1 PC tables (379531 PCs): 379531 [0x562577bd3338,0x56257819dbe8),
./src/test/fuzz/fuzz: Running 1 inputs 1 time(s) each.
Running: ./crash-d5f88bd8d0d460ffbab217b856b8582600c00503.log
addrman.cpp:80:14: runtime error: signed integer overflow: 2105390 - -9223372036854775808 cannot be represented in type 'long'
#0 0x5625752f0179 in CAddrInfo::IsTerrible(long) const addrman.cpp:80:14
#1 0x56257531917d in CAddrMan::GetAddr_(std::vector<CAddress, std::allocator<CAddress> >&, unsigned long, unsigned long, std::optional<Network>) const addrman.cpp:874:16
#2 0x562574f0251b in CAddrMan::GetAddr(unsigned long, unsigned long, std::optional<Network>) const ./addrman.h:259:9
#3 0x562574eff7ad in addrman_fuzz_target(Span<unsigned char const>) test/fuzz/addrman.cpp:295:26
SUMMARY: UndefinedBehaviorSanitizer: signed-integer-overflow addrman.cpp:80:14 in
ACKs for top commit:
practicalswift:
cr ACK facb534c37725ca446fd56d781b70ba26508bd2a
Tree-SHA512: 6368c48be8762c793f760d86caaf37a10caffa08f6903f3667dd08f7f67fade10f385fbffc451ddcbeeecc9fd02526ed97ab9de13398a75fffa55976a99af6b9
-rw-r--r-- | test/sanitizer_suppressions/ubsan | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/sanitizer_suppressions/ubsan b/test/sanitizer_suppressions/ubsan index b52e105a33..63e7c57ddb 100644 --- a/test/sanitizer_suppressions/ubsan +++ b/test/sanitizer_suppressions/ubsan @@ -5,6 +5,8 @@ # names can be used. # See https://github.com/google/sanitizers/issues/1364 signed-integer-overflow:txmempool.cpp +# nLastSuccess read from peers.dat might cause an overflow in IsTerrible +signed-integer-overflow:addrman.cpp # https://github.com/bitcoin/bitcoin/pull/21798#issuecomment-829180719 signed-integer-overflow:policy/feerate.cpp |