blob: 86be878677375c51753e5d0e9d69fffd413532c9 [file] [log] [blame] [view]
Max Moroz74aad9132019-07-26 21:11:571# Fuzzing in Chromium
aizatskya6f86292016-03-18 00:22:242
Max Moroz74aad9132019-07-26 21:11:573[go/chrome-fuzzing](https://goto.google.com/chrome-fuzzing) (Googler only)
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
Max Moroz4a8415a2019-08-02 17:46:5127* Improving fuzz target effectiveness: [Efficient Fuzzing Guide].
Max Moroz74aad9132019-07-26 21:11:5728* Creating a fuzz target that expects a protobuf (instead of a byte steam) as
29 input: [Guide to libprotobuf-mutator (LPM)].
30
Max Moroz4a8415a2019-08-02 17:46:5131 *** note
32 **Note:** you can also use LPM to 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
Max Moroz74aad9132019-07-26 21:11:5736* Reproducing bugs found by libFuzzer/AFL and reported by ClusterFuzz:
37 [Reproducing Bugs].
38
39## Further Reading
40
41* LibFuzzer's integration with Chromium and ClusterFuzz: [LibFuzzer
42 Integration].
43* AFL's integration with Chromium and ClusterFuzz: [AFL Integration].
44* Detailed references for other integration parts: [Reference].
45* Writing fuzzers for the non-browser parts of Chrome OS: [Fuzzing on Chrome
46 OS].
aizatskya6f86292016-03-18 00:22:2447
aizatsky9c8c5b02016-03-30 22:09:0948## Trophies
Max Moroz74aad9132019-07-26 21:11:5749* Issues found with in-process fuzzing and automatically filed by ClusterFuzz:
50 [ClusterFuzz Bugs].
51* Issues filed manually after running fuzz targets: [Manual Bugs].
52* Bugs found in PDFium by manual fuzzing: [PDFium Bugs].
53* Bugs found with libFuzzer in open-source projects: [OSS Trophies].
aizatsky9c8c5b02016-03-30 22:09:0954
Max Moroz74aad9132019-07-26 21:11:5755## Other Links
56* [Guided in-process fuzzing of Chrome components] blog post.
57* [ClusterFuzz Stats] for fuzz targets built with AddressSanitizer and
58 libFuzzer.
aizatsky68551322016-08-06 00:21:1859
Max Moroz74aad9132019-07-26 21:11:5760[AFL]: http://lcamtuf.coredump.cx/afl/
61[AFL Integration]: AFL_integration.md
62[Blackbox fuzzing]: https://google.github.io/clusterfuzz/setting-up-fuzzing/blackbox-fuzzing/
63[ClusterFuzz]: https://clusterfuzz.com/
64[ClusterFuzz Bugs]: 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
Max Moroz13c23182018-11-17 00:23:2265[ClusterFuzz Stats]: https://clusterfuzz.com/fuzzer-stats/by-fuzzer/fuzzer/libFuzzer/job/libfuzzer_chrome_asan
Max Moroz4a8415a2019-08-02 17:46:5166[Efficient Fuzzing Guide]: efficient_fuzzing.md
Max Moroz74aad9132019-07-26 21:11:5767[Fuzzing]: https://en.wikipedia.org/wiki/Fuzzing
68[Fuzzing on Chrome OS]: https://chromium.googlesource.com/chromiumos/docs/+/master/fuzzing.md
69[Getting Started Guide]: getting_started.md
70[Guide to libprotobuf-mutator (LPM)]: libprotobuf-mutator.md
71[Guided in-process fuzzing of Chrome components]: https://security.googleblog.com/2016/08/guided-in-process-fuzzing-of-chrome.html
aizatsky9c8c5b02016-03-30 22:09:0972[Manual Bugs]: 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[OSS Trophies]: http://llvm.org/docs/LibFuzzer.html#trophies
Max Moroz74aad9132019-07-26 21:11:5774[PDFium Bugs]: https://bugs.chromium.org/p/pdfium/issues/list?can=1&q=libfuzzer&colspec=ID+Type+Status+Priority+Milestone+Owner+Summary&cells=tiles
75[Reference]: reference.md
76[Reproducing Bugs]: reproducing.md
Max Moroz13c23182018-11-17 00:23:2277[crbug.com/539572]: https://bugs.chromium.org/p/chromium/issues/detail?id=539572
Max Moroz74aad9132019-07-26 21:11:5778[go/fuzzing-success]: https://goto.google.com/fuzzing-success
Max Moroz13c23182018-11-17 00:23:2279[libFuzzer]: http://llvm.org/docs/LibFuzzer.html
Max Moroz74aad9132019-07-26 21:11:5780[libFuzzer Integration]: libFuzzer_integration.md