SERVER-130965ClosedFixed
Handle unsigned overflow in FLE2 binary search
In {{binarySearchCommon()}} at [src/mongo/crypto/fle_crypto.cpp|https://github.com/10gen/mongo/blob/85387fec361fa96d0ef9ba7efb3fcf4e86d068a1/src/mongo/crypto/fle_crypto.cpp#L2293], the variable rho (uint64_t) is doubled via rho = 2 * rho inside a galloping loop with no overflow guard. If this continuous doubling eventually becomes 0, the {{ceil(log2(rho))}} would return -inf and converting that to uint64_t is undefined behavior.