Closed TedTed closed 1 year ago
Thanks for reporting. This is, indeed, dead and buggy code, and we will remove it. The intent was to use this to compute quantiles when we have a reliable cross-engine way to sample row values (rather than just return aggregates). When we reach that point, we'll use an algorithm that is safe, and ensure that our implementation doesn't leak values.
Fixed in 1.0.1
Hi folks,
This code contains a
quantile
function which is implemented naively. It's vulnerable to fairly trivial floating-point vulnerabilities. For example, the following code:will always return a value, but the following code:
will always crash with "ValueError: probabilities contain NaN".
I haven't tried it, but I'm also fairly certain that it's vulnerable to precision-based attacks, for the same reason as diffprivlib and SmartNoise Core: the use of
np.random.uniform
is very dangerous in that context.Thankfully, this code doesn't seem to be actually used anywhere (that I can see). Nonetheless, it probably seems worth removing it from the repository.