blob: 29dc829775da69128ad244f37c39837639d85928 [file] [log] [blame] [view]
Kevin Plyboncea94cf2019-09-12 18:18:371# Fuzz testing in Chromium
aizatskya6f86292016-03-18 00:22:242
Kevin Plybon8824b2fa2019-08-30 21:42:463[go/chrome-fuzzing](https://goto.google.com/chrome-fuzzing)
aizatsky88a677d2016-03-18 23:18:244
Kevin Plyboncea94cf2019-09-12 18:18:375[Fuzzing] is a testing technique that feeds auto-generated inputs to a piece
6of target code in an attempt to crash the code. It's one of the most effective
7methods we have for finding security and stability issues (see
8[go/fuzzing-success](http://go/fuzzing-success)). You can learn more about the
9benefits of fuzzing at [go/why-fuzz](http://go/why-fuzz).
aizatskya6f86292016-03-18 00:22:2410
Max Moroz74aad9132019-07-26 21:11:5711This documentation covers the in-process guided fuzzing approach employed by
12different fuzzing engines, such as [libFuzzer] or [AFL]. To learn more about
13out-of-process fuzzers, please refer to the [Blackbox fuzzing] page in the
14ClusterFuzz documentation.
aizatskya6f86292016-03-18 00:22:2415
Max Moroz74aad9132019-07-26 21:11:5716[TOC]
aizatskya6f86292016-03-18 00:22:2417
Max Moroz74aad9132019-07-26 21:11:5718## Getting Started
aizatskya6f86292016-03-18 00:22:2419
Max Moroz74aad9132019-07-26 21:11:5720In Chromium, you can easily create and submit fuzz targets. The targets are
21automatically discovered by buildbots, built with different fuzzing engines,
22then uploaded to the distributed [ClusterFuzz] fuzzing system to run at scale.
aizatskya6f86292016-03-18 00:22:2423
Max Moroz74aad9132019-07-26 21:11:5724Create your first fuzz target and submit it by stepping through our [Getting
25Started Guide].
aizatskya6f86292016-03-18 00:22:2426
Max Moroz74aad9132019-07-26 21:11:5727## Advanced Topics
28
Kevin Plybon8824b2fa2019-08-30 21:42:4629* [Improving fuzz target efficiency].
30* [Creating a fuzz target that expects a protobuf] instead of a byte stream as
31 input.
Max Moroz74aad9132019-07-26 21:11:5732
Max Moroz4a8415a2019-08-02 17:46:5133 *** note
Kevin Plybon8824b2fa2019-08-30 21:42:4634 **Note:** You can also fuzz code that needs multiple mutated
Max Moroz74aad9132019-07-26 21:11:5735 inputs, or to generate inputs defined by a grammar.
Max Moroz4a8415a2019-08-02 17:46:5136 ***
37
Kevin Plybon8824b2fa2019-08-30 21:42:4638* [Reproducing bugs] found by libFuzzer/AFL and reported by ClusterFuzz.
Max Moroz74aad9132019-07-26 21:11:5739
40## Further Reading
41
Kevin Plybon8824b2fa2019-08-30 21:42:4642* [LibFuzzer integration] with Chromium and ClusterFuzz.
43* [AFL integration] with Chromium and ClusterFuzz.
44* [Detailed references] for other integration parts.
45* Writing fuzzers for the [non-browser parts of Chrome OS].
aizatskya6f86292016-03-18 00:22:2446
aizatsky9c8c5b02016-03-30 22:09:0947## Trophies
Kevin Plybon8824b2fa2019-08-30 21:42:4648* [Issues automatically filed] by ClusterFuzz.
49* [Issues filed manually] after running fuzz targets.
50* [Bugs found in PDFium] by manual fuzzing.
51* [Bugs found in open-source projects] with libFuzzer.
aizatsky9c8c5b02016-03-30 22:09:0952
Max Moroz74aad9132019-07-26 21:11:5753## Other Links
54* [Guided in-process fuzzing of Chrome components] blog post.
55* [ClusterFuzz Stats] for fuzz targets built with AddressSanitizer and
56 libFuzzer.
aizatsky68551322016-08-06 00:21:1857
Max Moroz74aad9132019-07-26 21:11:5758[AFL]: http://lcamtuf.coredump.cx/afl/
Kevin Plybon8824b2fa2019-08-30 21:42:4659[AFL integration]: AFL_integration.md
Max Moroz74aad9132019-07-26 21:11:5760[Blackbox fuzzing]: https://google.github.io/clusterfuzz/setting-up-fuzzing/blackbox-fuzzing/
Kevin Plybon8824b2fa2019-08-30 21:42:4661[Bugs found in open-source projects]: http://llvm.org/docs/LibFuzzer.html#trophies
62[Bugs found in PDFium]: https://bugs.chromium.org/p/pdfium/issues/list?can=1&q=libfuzzer&colspec=ID+Type+Status+Priority+Milestone+Owner+Summary&cells=tiles
Max Moroz74aad9132019-07-26 21:11:5763[ClusterFuzz]: https://clusterfuzz.com/
Max Moroz13c23182018-11-17 00:23:2264[ClusterFuzz Stats]: https://clusterfuzz.com/fuzzer-stats/by-fuzzer/fuzzer/libFuzzer/job/libfuzzer_chrome_asan
Kevin Plybon8824b2fa2019-08-30 21:42:4665[Creating a fuzz target that expects a protobuf]: libprotobuf-mutator.md
66[Detailed references]: reference.md
Max Moroz74aad9132019-07-26 21:11:5767[Fuzzing]: https://en.wikipedia.org/wiki/Fuzzing
Max Moroz74aad9132019-07-26 21:11:5768[Getting Started Guide]: getting_started.md
Max Moroz74aad9132019-07-26 21:11:5769[Guided in-process fuzzing of Chrome components]: https://security.googleblog.com/2016/08/guided-in-process-fuzzing-of-chrome.html
Kevin Plybon8824b2fa2019-08-30 21:42:4670[Improving fuzz target efficiency]: efficient_fuzzing.md
71[Issues automatically filed]: https://bugs.chromium.org/p/chromium/issues/list?sort=-modified&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified&q=label%3AStability-LibFuzzer%2CStability-AFL%20label%3AClusterFuzz%20-status%3AWontFix%2CDuplicate&can=1
72[Issues filed manually]: https://bugs.chromium.org/p/chromium/issues/list?can=1&q=label%3AStability-LibFuzzer+-label%3AClusterFuzz&sort=-modified&colspec=ID+Pri+M+Stars+ReleaseBlock+Component+Status+Owner+Summary+OS+Modified&x=m&y=releaseblock&cells=ids
73[non-browser parts of Chrome OS]: https://chromium.googlesource.com/chromiumos/docs/+/master/fuzzing.md
74[Reproducing bugs]: reproducing.md
Max Moroz13c23182018-11-17 00:23:2275[crbug.com/539572]: https://bugs.chromium.org/p/chromium/issues/detail?id=539572
Max Moroz74aad9132019-07-26 21:11:5776[go/fuzzing-success]: https://goto.google.com/fuzzing-success
Max Moroz13c23182018-11-17 00:23:2277[libFuzzer]: http://llvm.org/docs/LibFuzzer.html
Kevin Plybon8824b2fa2019-08-30 21:42:4678[libFuzzer integration]: libFuzzer_integration.md