mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 11:57:28 -03:00
63e8fc912c
Add ubsan suppressions for integer overflows in the getchaintxstats RPC. getchainstatstx line "int nTxDiff = pindex->nChainTx - past_block.nChainTx" can trigger ubsan integer overflows when assumeutxo snapshots are loaded, from subtracting unsigned values and assigning the result to a signed int. The overflow behavior probably exists in current code but is hard to trigger because it would require calling getchainstatstx at the right time with specific parameters as background blocks are being downloaded. But the overflow behavior becomes easier to trigger in the upcoming commit removing fake nChainTx values, so a suppression needs to be added before then for CI to pass. getchainstatstx should probably be improved separately in another PR to not need this suppression, and handle edge cases and missing nChainTx values more carefully.
77 lines
3.4 KiB
Text
77 lines
3.4 KiB
Text
# Suppressions should use `sanitize-type:ClassName::MethodName`.
|
|
|
|
# -fsanitize=undefined suppressions
|
|
# =================================
|
|
|
|
# -fsanitize=integer suppressions
|
|
# ===============================
|
|
# Dependencies
|
|
# ------------
|
|
# Suppressions in dependencies that are developed outside this repository.
|
|
unsigned-integer-overflow:*/include/c++/
|
|
unsigned-integer-overflow:FuzzedDataProvider::ConsumeIntegralInRange
|
|
unsigned-integer-overflow:leveldb/
|
|
unsigned-integer-overflow:minisketch/
|
|
unsigned-integer-overflow:secp256k1/
|
|
unsigned-integer-overflow:test/fuzz/crypto_diff_fuzz_chacha20.cpp
|
|
implicit-integer-sign-change:*/include/boost/
|
|
implicit-integer-sign-change:*/include/c++/
|
|
implicit-integer-sign-change:*/new_allocator.h
|
|
implicit-integer-sign-change:crc32c/
|
|
implicit-integer-sign-change:minisketch/
|
|
implicit-integer-sign-change:secp256k1/
|
|
implicit-signed-integer-truncation:*/include/c++/
|
|
implicit-signed-integer-truncation:leveldb/
|
|
implicit-signed-integer-truncation:secp256k1/
|
|
implicit-signed-integer-truncation,implicit-integer-sign-change:secp256k1_modinv64_posdivsteps_62_var
|
|
implicit-unsigned-integer-truncation:*/include/c++/
|
|
implicit-unsigned-integer-truncation:leveldb/
|
|
implicit-unsigned-integer-truncation:secp256k1/
|
|
implicit-unsigned-integer-truncation:test/fuzz/crypto_diff_fuzz_chacha20.cpp
|
|
shift-base:*/include/c++/
|
|
shift-base:leveldb/
|
|
shift-base:minisketch/
|
|
shift-base:secp256k1/
|
|
shift-base:test/fuzz/crypto_diff_fuzz_chacha20.cpp
|
|
# Unsigned integer overflow occurs when the result of an unsigned integer
|
|
# computation cannot be represented in its type. Unlike signed integer overflow,
|
|
# this is not undefined behavior, but it is often unintentional. The list below
|
|
# contains files in which we expect unsigned integer overflows to occur. The
|
|
# list is used to suppress -fsanitize=integer warnings when running our CI UBSan
|
|
# job.
|
|
unsigned-integer-overflow:arith_uint256.h
|
|
unsigned-integer-overflow:CBloomFilter::Hash
|
|
unsigned-integer-overflow:CRollingBloomFilter::insert
|
|
unsigned-integer-overflow:RollingBloomHash
|
|
unsigned-integer-overflow:CCoinsViewCache::AddCoin
|
|
unsigned-integer-overflow:CCoinsViewCache::BatchWrite
|
|
unsigned-integer-overflow:CCoinsViewCache::DynamicMemoryUsage
|
|
unsigned-integer-overflow:CCoinsViewCache::SpendCoin
|
|
unsigned-integer-overflow:CCoinsViewCache::Uncache
|
|
unsigned-integer-overflow:CompressAmount
|
|
unsigned-integer-overflow:DecompressAmount
|
|
unsigned-integer-overflow:crypto/
|
|
unsigned-integer-overflow:getchaintxstats*
|
|
unsigned-integer-overflow:MurmurHash3
|
|
unsigned-integer-overflow:CBlockPolicyEstimator::processBlockTx
|
|
unsigned-integer-overflow:TxConfirmStats::EstimateMedianVal
|
|
unsigned-integer-overflow:prevector.h
|
|
unsigned-integer-overflow:EvalScript
|
|
unsigned-integer-overflow:xoroshiro128plusplus.h
|
|
implicit-integer-sign-change:CBlockPolicyEstimator::processBlockTx
|
|
implicit-integer-sign-change:SetStdinEcho
|
|
implicit-integer-sign-change:compressor.h
|
|
implicit-integer-sign-change:crypto/
|
|
implicit-integer-sign-change:getchaintxstats*
|
|
implicit-integer-sign-change:TxConfirmStats::removeTx
|
|
implicit-integer-sign-change:prevector.h
|
|
implicit-integer-sign-change:verify_flags
|
|
implicit-integer-sign-change:EvalScript
|
|
implicit-integer-sign-change:serialize.h
|
|
implicit-signed-integer-truncation:crypto/
|
|
implicit-unsigned-integer-truncation:crypto/
|
|
shift-base:arith_uint256.cpp
|
|
shift-base:crypto/
|
|
shift-base:streams.h
|
|
shift-base:FormatHDKeypath
|
|
shift-base:xoroshiro128plusplus.h
|