blob: 5301c317f12b1a9dc54df6662ba2db59a6e1631a [file] [log] [blame] [view]
Max Moroz74aad9132019-07-26 21:11:571# Fuzzing 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
Max Moroz74aad9132019-07-26 21:11:575[Fuzzing] is a testing technique that feeds randomized inputs to a target code
6in an attempt to crash it. It's one of the most effective methods we have for
7finding security and stability issues ([go/fuzzing-success]).
aizatskya6f86292016-03-18 00:22:248
Max Moroz74aad9132019-07-26 21:11:579This documentation covers the in-process guided fuzzing approach employed by
10different fuzzing engines, such as [libFuzzer] or [AFL]. To learn more about
11out-of-process fuzzers, please refer to the [Blackbox fuzzing] page in the
12ClusterFuzz documentation.
aizatskya6f86292016-03-18 00:22:2413
Max Moroz74aad9132019-07-26 21:11:5714[TOC]
aizatskya6f86292016-03-18 00:22:2415
Max Moroz74aad9132019-07-26 21:11:5716## Getting Started
aizatskya6f86292016-03-18 00:22:2417
Max Moroz74aad9132019-07-26 21:11:5718In Chromium, you can easily create and submit fuzz targets. The targets are
19automatically discovered by buildbots, built with different fuzzing engines,
20then uploaded to the distributed [ClusterFuzz] fuzzing system to run at scale.
aizatskya6f86292016-03-18 00:22:2421
Max Moroz74aad9132019-07-26 21:11:5722Create your first fuzz target and submit it by stepping through our [Getting
23Started Guide].
aizatskya6f86292016-03-18 00:22:2424
Max Moroz74aad9132019-07-26 21:11:5725## Advanced Topics
26
Kevin Plybon8824b2fa2019-08-30 21:42:4627* [Improving fuzz target efficiency].
28* [Creating a fuzz target that expects a protobuf] instead of a byte stream as
29 input.
Max Moroz74aad9132019-07-26 21:11:5730
Max Moroz4a8415a2019-08-02 17:46:5131 *** note
Kevin Plybon8824b2fa2019-08-30 21:42:4632 **Note:** You can also fuzz code that needs multiple mutated
Max Moroz74aad9132019-07-26 21:11:5733 inputs, or to generate inputs defined by a grammar.
Max Moroz4a8415a2019-08-02 17:46:5134 ***
35
Kevin Plybon8824b2fa2019-08-30 21:42:4636* [Reproducing bugs] found by libFuzzer/AFL and reported by ClusterFuzz.
Max Moroz74aad9132019-07-26 21:11:5737
38## Further Reading
39
Kevin Plybon8824b2fa2019-08-30 21:42:4640* [LibFuzzer integration] with Chromium and ClusterFuzz.
41* [AFL integration] with Chromium and ClusterFuzz.
42* [Detailed references] for other integration parts.
43* Writing fuzzers for the [non-browser parts of Chrome OS].
aizatskya6f86292016-03-18 00:22:2444
aizatsky9c8c5b02016-03-30 22:09:0945## Trophies
Kevin Plybon8824b2fa2019-08-30 21:42:4646* [Issues automatically filed] by ClusterFuzz.
47* [Issues filed manually] after running fuzz targets.
48* [Bugs found in PDFium] by manual fuzzing.
49* [Bugs found in open-source projects] with libFuzzer.
aizatsky9c8c5b02016-03-30 22:09:0950
Max Moroz74aad9132019-07-26 21:11:5751## Other Links
52* [Guided in-process fuzzing of Chrome components] blog post.
53* [ClusterFuzz Stats] for fuzz targets built with AddressSanitizer and
54 libFuzzer.
aizatsky68551322016-08-06 00:21:1855
Max Moroz74aad9132019-07-26 21:11:5756[AFL]: http://lcamtuf.coredump.cx/afl/
Kevin Plybon8824b2fa2019-08-30 21:42:4657[AFL integration]: AFL_integration.md
Max Moroz74aad9132019-07-26 21:11:5758[Blackbox fuzzing]: https://google.github.io/clusterfuzz/setting-up-fuzzing/blackbox-fuzzing/
Kevin Plybon8824b2fa2019-08-30 21:42:4659[Bugs found in open-source projects]: http://llvm.org/docs/LibFuzzer.html#trophies
60[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:5761[ClusterFuzz]: https://clusterfuzz.com/
Max Moroz13c23182018-11-17 00:23:2262[ClusterFuzz Stats]: https://clusterfuzz.com/fuzzer-stats/by-fuzzer/fuzzer/libFuzzer/job/libfuzzer_chrome_asan
Kevin Plybon8824b2fa2019-08-30 21:42:4663[Creating a fuzz target that expects a protobuf]: libprotobuf-mutator.md
64[Detailed references]: reference.md
Max Moroz74aad9132019-07-26 21:11:5765[Fuzzing]: https://en.wikipedia.org/wiki/Fuzzing
Max Moroz74aad9132019-07-26 21:11:5766[Getting Started Guide]: getting_started.md
Max Moroz74aad9132019-07-26 21:11:5767[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:4668[Improving fuzz target efficiency]: efficient_fuzzing.md
69[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
70[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
71[non-browser parts of Chrome OS]: https://chromium.googlesource.com/chromiumos/docs/+/master/fuzzing.md
72[Reproducing bugs]: reproducing.md
Max Moroz13c23182018-11-17 00:23:2273[crbug.com/539572]: https://bugs.chromium.org/p/chromium/issues/detail?id=539572
Max Moroz74aad9132019-07-26 21:11:5774[go/fuzzing-success]: https://goto.google.com/fuzzing-success
Max Moroz13c23182018-11-17 00:23:2275[libFuzzer]: http://llvm.org/docs/LibFuzzer.html
Kevin Plybon8824b2fa2019-08-30 21:42:4676[libFuzzer integration]: libFuzzer_integration.md