Problem: With the UnstableChain IPC interface from #29409 merged, an IPC client could make bitcoin-node hit an Assume failure (debug builds) or compute wrong fees (release builds) by passing a malformed feerate to broadcastTransaction, calculateIndividualBumpFees or calculateCombinedBumpFee. These methods take feerates as serialized Data fields, and CFeeRate deserialization reads the fee and size without the checks its constructors do, so it accepts a negative size, which fee calculations require to be positive, and a zero size with a nonzero fee, which compares as an infinite feerate. Nothing deserializes a CFeeRate on master today.
Solution: Make CFeeRate deserialization throw on values its constructors cannot produce, the same way other malformed serialized data is rejected. The change is a SER_READ check in src/policy/feerate.h plus a unit test. It is similar to #36520, which handles other invalid arguments to Chain IPC methods.
This issue was found by Project Loupe and passed on by instagibbs.