A very funny thing about fuzzing is how random input testing used to be so looked down upon by the software testing community. Read old (1970s) testing books and you'll see comments like "random testing is the worst kind of testing". I still saw this even as recently as a decade ago.
You really shouldn't do random testing. Fuzzing is better, but property testing (fuzzing with shrinkage) is even better.
How to break everything by fuzz testing
31–39 of 39 posts
Re: How to break everything by fuzz testing
#32Re: How to break everything by fuzz testing
#33First real customer walks in and asks where the bathroom is. The bar bursts into flames, killing everyone."
Re: How to break everything by fuzz testing
#34Earlier quoted context omitted.
Fuzzing is not random testing though. It's directed random testing.
The original fuzzing was as random + black box as it gets.
Re: How to break everything by fuzz testing
#35Earlier quoted context omitted.
The original fuzzing was as random + black box as it gets.
Yes, and things like coverage guided fuzzing have completely revolutionized things. Prior to directed fuzzing, it was okay but largely unimpressive. Now it blazes through code structures that were previously used as motivating examples for symbolic execution. It is a meaningfully different technique today.
Re: How to break everything by fuzz testing
#36Earlier quoted context omitted.
Yes, and things like coverage guided fuzzing have completely revolutionized things. Prior to directed fuzzing, it was okay but largely unimpressive. Now it blazes through code structures that were previously used as motivating examples for symbolic execution. It is a meaningfully different technique today.
Well, that depends on what you mean by "impressive", and in what domain. Black box compiler fuzzing has been very effective.
Re: How to break everything by fuzz testing
#37Earlier quoted context omitted.
Well, that depends on what you mean by "impressive", and in what domain. Black box compiler fuzzing has been very effective.
That's actually one of the few fields where I feel like fuzzing has underperformed. There was an interesting paper at OOPSLA this year that found that while the fuzzing community has indeed found a lot of bugs, that these bugs actually are triggered by real code approximately-never. It was a really interesting result coming from within a community that ordinarily biases towards overinflating the value of PL technique…
Another thing to remember is that as blackbox fuzzing became state of the practice, its benefit declined, as the bugs it would find would be found early, by the developers themselves. All testing techniques are self-limiting this way.
I want you to look at the results of jsfunfuzz and tell me the impact of that wasn't profound.
Re: How to break everything by fuzz testing
#38Interesting. Is there any fuzzing libraries for c#?
Can you call c# from C? If so, then you can just use any C fuzzing library, and have it call your C# code. I do this with C++ and Objective-C using clang's libfuzzer. You write a single C function that takes a pointer to a buffer and a length and pass it to whomever you want. I just write a C wrapper that calls my Objective-C or C++ functions with the data.
Re: How to break everything by fuzz testing
#39Earlier quoted context omitted.
The kind of bugs that would take probably a lot of time of think of and write unit tests for, in advance. Would it? Maybe it's because I've had a "low-level upbringing", but whenever I'm writing parsing code for a file format, "assume any byte of data you read can have any value" is the norm. The rest of it follows from there.
Yeah, I've gotten to the point where I can't do any arithmetic on any values without immediately adding integer wrap tests afterwards.
But when the result is more than 10, you've wrapped: your answer is off the D scale. So now you have to push the inner part back to the left, and line up the 10 (usually marked as 1, at the right-hand end) on the C scale with the first number on the D scale. And remember to add 1 to the exponent.
I've seen slide rules where the D scale goes slightly beyond 10 (like 10.1), so if the result was just a tiny bit over 10, you wouldn't need to wrap.