monero/src/cryptonote_core
Tom Smeding 6bbc646e6f Fix bug in mempool get_transaction_stats histogram calculation
The 98th percentile position in the agebytes map was incorrectly
calculated: it assumed the transactions in the mempool all have unique
timestamps at second-granularity. This commit fixes this by correctly
finding the right cumulative number of transactions in the map suffix.

This bug could lead to an out-of-bounds write in the rare case that
all transactions in the mempool were received (and added to the mempool)
at a rate of at least 50 transactions per second. (More specifically,
the number of *unique* receive_time values, which have second-
granularity, must be at most 2% of the number of transactions in the
mempool for this crash to trigger.) If this condition is satisfied, 'it'
points to *before* the agebytes map, 'delta' gets a nonsense value, and
the value of 'i' in the first stats.histo-filling loop will be out of
bounds of stats.histo.
2019-08-28 16:46:31 +02:00
..
blockchain.cpp Merge pull request #5721 2019-08-19 17:25:52 -05:00
blockchain.h Merge pull request #5721 2019-08-19 17:25:52 -05:00
blockchain_storage_boost_serialization.h Update 2019 copyright 2019-03-05 22:05:34 +01:00
CMakeLists.txt rpc: new sanity check on relayed transactions 2019-04-12 20:22:09 +00:00
cryptonote_core.cpp Merge pull request #5637 2019-08-15 17:09:15 -05:00
cryptonote_core.h Unused private member m_miner_address 2019-05-29 10:12:47 -04:00
cryptonote_tx_utils.cpp Replace std::random_shuffle with std::shuffle 2019-08-15 16:33:15 +02:00
cryptonote_tx_utils.h wallet: provide original address for outgoing transfers 2019-07-10 13:39:18 +00:00
tx_pool.cpp Fix bug in mempool get_transaction_stats histogram calculation 2019-08-28 16:46:31 +02:00
tx_pool.h Update 2019 copyright 2019-03-05 22:05:34 +01:00
tx_sanity_check.cpp Merge pull request #5755 2019-08-21 15:23:58 -05:00
tx_sanity_check.h rpc: new sanity check on relayed transactions 2019-04-12 20:22:09 +00:00