mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-24 14:40:12 +01:00
fa3c787b62fuzz: Abort when global PRNG is used before SeedRand::ZEROS (MarcoFalke) Pull request description: This adds one more check to abort when global PRNG is used before SeedRand::ZEROS in fuzz tests. This is achieved by carving out the two remaining uses. First, `g_rng_temp_path_init`, and second the random fallback for `RANDOM_CTX_SEED`, which isn't used in fuzz tests anyway. Requested in https://github.com/bitcoin/bitcoin/pull/31521#issuecomment-2554669015 Can be tested by revertingfadd568931and observing an abort when running the `utxo_total_supply` fuzz target. ACKs for top commit: marcofleon: ACKfa3c787b62hodlinator: re-ACKfa3c787b62ryanofsky: Code review ACKfa3c787b62. This adds a new check to make that sure that RNG is never seeded during fuzzing after the RNG has been used. Together with existing checks which ensure RNG can only be seeded with zeroes during fuzzing, and that RNG must was seeded at some point if used after fuzzing, this implies it must have been seeded by zeros before being used. Tree-SHA512: 2614928d31c310309bd9021b3e5637b35f64196020fbf9409e978628799691d0efd3f4cf606be9a2db0ef60b010f890c2e70c910eaa2934a7fbf64cd1598fe22
8.8 KiB
8.8 KiB