Conceptresearch
Exponential cost of vulnerability discovery
Also called Bohme-Falk law.
An empirical law of fuzzing, measured in campaigns and explained by a species model, that each new bug found in a fixed time takes exponentially more machines.
The exponential cost of vulnerability discovery is an empirical law of fuzz testing, stated by Böhme and Falk (2020): with the same fuzzer and the same time budget, finding linearly more bugs takes exponentially more machines. If a campaign on one machine finds some bugs in a day, each further bug found in that day may need about twice the machines of the one before, as in the paper's own example. The same holds for coverage: each further branch costs exponentially more. The law is the reverse for what is already known: with twice the machines, the fuzzer finds the same bugs in about half the time. The law is a measurement, not a theorem. Böhme and Falk derived it from more than four CPU years of campaigns on almost three hundred open source programs, and they explain it with the species model of STADS, in which most program behaviors are rare. The explanation depends on how the probabilities of the behaviors are spread, and the paper names cases where the law does not hold.
In plain words
Think of a fuzzer as a machine that draws random tickets, where each kind of bug is a prize. A few prizes are common, and many are very rare, each rarer than the one before. Doubling the number of machines doubles the tickets drawn in a day. That is enough to find the next rarest prize, but only that one. To find one more prize, you double again. So each extra bug costs as much as all the machines before it.
For a prize you have already found, more tickets help directly: twice the tickets per hour find it in half the time.
This is why repeating old results is cheap and finding new bugs is expensive. It also means that an attacker with many more machines than you finds only a few bugs that you missed.
The idea
The setting. A machine is an abstraction for inputs per minute: machines generate times as many inputs in the same time, with no cost for synchronization and with every new seed shared at once. Böhme and Falk simulated more machines by dividing the time stamps of real campaigns by . Real parallel fuzzing has overhead, so the measured cost is a lower bound on the real cost.
The three laws (measurements). For a non-deterministic fuzzer, the paper states:
- A fuzzer that generates exponentially more inputs per minute discovers only linearly more new species in the same time, or fewer. Species here are known vulnerabilities, crashing campaigns, LibFuzzer features and edges, and AFL seeds and map coverage.
- It discovers the same number of species exponentially faster.
- The probability to discover a given species in the time budget at first grows exponentially with the exponent , until the discovery is expected; then the growth slows and the probability tends to 1.
The species model (explanation). A blackbox fuzzer samples inputs with replacement, and input belongs to species with probability , fixed over the campaign. The expected number of species found after inputs is
Let be the probability that one machine misses a given species in the budget. With machines the species is found with probability . This curve has its inflection point at , where : before that point the probability is near 0 and grows fast, after it the probability is near 1. So each species switches from "not found" to "found" over a narrow range of . If the species are spread over many orders of magnitude of abundance, about the same number of them switch for each doubling, and grows linearly in . The inflection point is a theorem of the model; that real species follow such a spread is the empirical part.
Where the explanation stops. The model is for a blackbox fuzzer with fixed probabilities; for greybox fuzzers it is an explanation by analogy, which the measurements support. The paper calls the law empirical because it rests on the spread of the abundances, and names two cases where it fails: when all species are equally likely, and when there is only one species. The simulations, the authors note, are an explanation and not a proof.
Examples
Geometric abundances. Take 60 species with for to 59 and , so that the probabilities sum to 1, and a budget of inputs per machine. The expected number of species found is
| machines | 1 | 2 | 4 | 8 | 16 | 32 | 1024 |
|---|---|---|---|---|---|---|---|
| expected species | 10.299 | 11.299 | 12.299 | 13.299 | 14.299 | 15.299 | 20.299 |
Each doubling adds one species, to three decimals. Species is expected to be found after about inputs, so doubling the inputs moves the frontier by one species. Measured as the least number of machines whose expectation exceeds the one-machine value by , the cost for more species is 3, 5, 9, 17 and 33 machines.
Equal abundances. Take 40 species, each with , and 100 inputs per machine. One machine expects 36.819 species, two expect 39.747, four 39.998, and eight 40.000. A few machines find everything, and no more machines can add anything: the number of species does not grow linearly in the exponent. This is the coupon collector setting, one of the cases where the law fails. A scratch script computed both tables from the formula for .
The measured campaigns. In the paper's figures, the additional species found against of the machines fit a straight line with above 97 percent for most LibFuzzer benchmarks. For AFL on six programs, three of the six grew linearly in seeds and the others grew more slowly, which is an even higher cost. These are measurements on the paper's benchmarks and settings.
Where it is used
- Planning resources. The law says that adding machines to a mature campaign that finds no new bugs is a poor way to find more. A different fuzzer, new seeds, a better harness or a different target changes the species and their probabilities; more of the same only moves the frontier slowly.
- Reasoning about attackers. A defender who has fuzzed a program with many machines can expect an attacker with the same fuzzer and a few times more machines to find only a few bugs the defender missed. The paper gives this argument as a consequence of the law, not as a guarantee.
- Evaluating fuzzers. Campaigns are random and their results grow slowly with time, so a short or single run says little. Comparisons need repeated trials and a time budget fixed in advance, as Klees et al. (2018) recommend.
- Estimation during a campaign. The same species model gives the Good-Turing estimate of the chance of a new discovery and the Chao1 estimate of the number of species, which tell how close a campaign is to its frontier.
- Heavy-tailed data elsewhere. Many counts in software and language are heavy tailed, as in Zipf's law; where they are, sampling finds new types only slowly.
References
- Marcel Böhme and Brandon Falk, Fuzzing, on the exponential cost of vulnerability discovery, Proceedings of ESEC/FSE 2020, pp. 713 to 724, Section 2 (the benchmarks, the fuzzers and the scaling of time stamps), Section 3 (the three empirical laws) and Section 4 (the species model, the inflection point and the simulation with power-law abundances)
- Marcel Böhme, STADS, software testing as species discovery, ACM Transactions on Software Engineering and Methodology 27(2), Article 7, 2018, pp. 1 to 52, the multinomial model of fuzzing as sampling species with replacement
- George Klees, Andrew Ruef, Benji Cooper, Shiyi Wei and Michael Hicks, Evaluating fuzz testing, Proceedings of CCS 2018, pp. 2123 to 2138, why the results of fuzzing campaigns are random and must be compared over repeated trials
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag 6W73R7 Edit this page History Report an error Markdown