Kostya Serebryany | 7967738 | 2015-03-31 21:39:38 +0000 | [diff] [blame] | 1 | ======================================================== |
Kostya Serebryany | 35ce863 | 2015-03-30 23:05:30 +0000 | [diff] [blame] | 2 | LibFuzzer -- a library for coverage-guided fuzz testing. |
| 3 | ======================================================== |
Kostya Serebryany | 7967738 | 2015-03-31 21:39:38 +0000 | [diff] [blame] | 4 | .. contents:: |
| 5 | :local: |
Kostya Serebryany | d11dc17 | 2016-03-12 02:56:25 +0000 | [diff] [blame] | 6 | :depth: 1 |
Kostya Serebryany | 7967738 | 2015-03-31 21:39:38 +0000 | [diff] [blame] | 7 | |
| 8 | Introduction |
| 9 | ============ |
Kostya Serebryany | 35ce863 | 2015-03-30 23:05:30 +0000 | [diff] [blame] | 10 | |
Kostya Serebryany | d11dc17 | 2016-03-12 02:56:25 +0000 | [diff] [blame] | 11 | libFuzzer -- library for in-process evolutionary fuzzing of other libraries. |
Kostya Serebryany | 35ce863 | 2015-03-30 23:05:30 +0000 | [diff] [blame] | 12 | |
Kostya Serebryany | d11dc17 | 2016-03-12 02:56:25 +0000 | [diff] [blame] | 13 | The typical workflow looks like the following. |
| 14 | First, implement a fuzzing target function, like this:: |
| 15 | |
| 16 | // fuzz_target.cc |
| 17 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { |
| 18 | DoSomethingInterestingWithMyAPI(Data, Size); |
Kostya Serebryany | 9e1a238 | 2016-03-29 23:07:36 +0000 | [diff] [blame^] | 19 | return 0; // Non-zero return values are reserved for future use. |
Kostya Serebryany | d11dc17 | 2016-03-12 02:56:25 +0000 | [diff] [blame] | 20 | } |
| 21 | |
| 22 | Next, build the Fuzzer library as a static archive. Note that libFuzzer contains the `main()` function:: |
| 23 | |
| 24 | svn co http://llvm.org/svn/llvm-project/llvm/trunk/lib/Fuzzer |
| 25 | clang++ -c -g -O2 -std=c++11 Fuzzer/*.cpp -IFuzzer |
| 26 | ar ruv libFuzzer.a Fuzzer*.o |
| 27 | |
| 28 | Then build the target function and the library you are going to test. |
| 29 | You should use SanitizerCoverage_ and one of ASan, MSan, or UBSan. |
| 30 | Link it with `libFuzzer.a`:: |
| 31 | |
| 32 | clang -fsanitize-coverage=edge -fsanitize=address your_lib.cc fuzz_target.cc libFuzzer.a -o my_fuzzer |
| 33 | |
| 34 | Create a directory with the initial "seed" samlpes. |
| 35 | For some input types libFuzzer will work just fine w/o any seeds, |
| 36 | but for complex inputs this step is very important:: |
| 37 | |
| 38 | mkdir CORPUS_DIR |
| 39 | cp /some/input/samples/* CORPUS_DIR |
| 40 | |
| 41 | Finally, run the fuzzer on the `CORPUS_DIR`:: |
| 42 | |
| 43 | ./my_fuzzer CORPUS_DIR # -max_len=1000 -jobs=20 -more_lags=... |
Kostya Serebryany | 35ce863 | 2015-03-30 23:05:30 +0000 | [diff] [blame] | 44 | |
| 45 | |
Kostya Serebryany | d11dc17 | 2016-03-12 02:56:25 +0000 | [diff] [blame] | 46 | As new interesting test cases are discovered they will be added to the corpus. |
| 47 | If a bug is discovered by the sanitizer (ASan, etc) it will be reported as usual and the reproducer |
| 48 | will be written to disk. |
| 49 | Each Fuzzer process is single-threaded (unless the library starts its own |
| 50 | threads). You can run the libFuzzer on the same corpus in multiple processes |
| 51 | in parallel (use the flags `-jobs=N` and `-workers=N`). |
| 52 | |
| 53 | libFuzzer is similar in concept to AFL_, |
| 54 | but uses in-process Fuzzing, which is more fragile and restrictive, but |
Kostya Serebryany | 35ce863 | 2015-03-30 23:05:30 +0000 | [diff] [blame] | 55 | potentially much faster as it has no overhead for process start-up. |
Kostya Serebryany | 7967738 | 2015-03-31 21:39:38 +0000 | [diff] [blame] | 56 | It uses LLVM's SanitizerCoverage_ instrumentation to get in-process |
| 57 | coverage-feedback |
Kostya Serebryany | 35ce863 | 2015-03-30 23:05:30 +0000 | [diff] [blame] | 58 | |
Kostya Serebryany | 9e1a238 | 2016-03-29 23:07:36 +0000 | [diff] [blame^] | 59 | The code resides in the LLVM repository, |
| 60 | requires the fresh Clang compiler to build |
Kostya Serebryany | 7967738 | 2015-03-31 21:39:38 +0000 | [diff] [blame] | 61 | and is used to fuzz various parts of LLVM, |
| 62 | but the Fuzzer itself does not (and should not) depend on any |
| 63 | part of LLVM and can be used for other projects w/o requiring the rest of LLVM. |
Kostya Serebryany | 35ce863 | 2015-03-30 23:05:30 +0000 | [diff] [blame] | 64 | |
Kostya Serebryany | 9e1a238 | 2016-03-29 23:07:36 +0000 | [diff] [blame^] | 65 | Fresh Clang |
| 66 | ----------- |
| 67 | |
| 68 | If you don't know where to get the fresh Clang binaries and don't want to build |
| 69 | it from trunk (why wouldn't you?) you may grab the fresh Clang binaries |
| 70 | maintained by the Chromium developers:: |
| 71 | |
| 72 | mkdir TMP_CLANG |
| 73 | cd TMP_CLANG |
| 74 | git clone https://chromium.googlesource.com/chromium/src/tools/clang |
| 75 | cd .. |
| 76 | TMP_CLANG/clang/scripts/update.py |
| 77 | |
| 78 | This will install a reasonably fresh and well tested clang binaries as |
| 79 | `third_party/llvm-build/Release+Asserts/bin/clang` |
| 80 | |
Kostya Serebryany | d11dc17 | 2016-03-12 02:56:25 +0000 | [diff] [blame] | 81 | Usage |
| 82 | ===== |
| 83 | To run fuzzing pass 0 or more directories. New samples will be written into `dir1`, other directories will be read once during startup.:: |
Kostya Serebryany | bfbe7fc | 2016-02-02 03:03:47 +0000 | [diff] [blame] | 84 | |
| 85 | ./fuzzer [-flag1=val1 [-flag2=val2 ...] ] [dir1 [dir2 ...] ] |
| 86 | |
| 87 | To run individual tests without fuzzing pass 1 or more files:: |
| 88 | |
| 89 | ./fuzzer [-flag1=val1 [-flag2=val2 ...] ] file1 [file2 ...] |
| 90 | |
Kostya Serebryany | 2adfa3b | 2015-05-20 21:03:03 +0000 | [diff] [blame] | 91 | The most important flags are:: |
| 92 | |
| 93 | seed 0 Random seed. If 0, seed is generated. |
| 94 | runs -1 Number of individual test runs (-1 for infinite runs). |
Kostya Serebryany | 64d2457 | 2016-03-12 01:57:04 +0000 | [diff] [blame] | 95 | max_len 0 Maximum length of the test input. If 0, libFuzzer tries to guess a good value based on the corpus and reports it. |
Kostya Serebryany | 316b571 | 2015-05-26 20:57:47 +0000 | [diff] [blame] | 96 | timeout 1200 Timeout in seconds (if positive). If one unit runs more than this number of seconds the process will abort. |
Kostya Serebryany | 54a6363 | 2016-01-29 23:30:07 +0000 | [diff] [blame] | 97 | timeout_exitcode 77 Unless abort_on_timeout is set, use this exitcode on timeout. |
Kostya Serebryany | b85db17 | 2015-10-02 20:47:55 +0000 | [diff] [blame] | 98 | max_total_time 0 If positive, indicates the maximal total time in seconds to run the fuzzer. |
Kostya Serebryany | 2adfa3b | 2015-05-20 21:03:03 +0000 | [diff] [blame] | 99 | help 0 Print help. |
Kostya Serebryany | 9cc3b0d | 2015-10-24 01:16:40 +0000 | [diff] [blame] | 100 | merge 0 If 1, the 2-nd, 3-rd, etc corpora will be merged into the 1-st corpus. Only interesting units will be taken. |
Kostya Serebryany | 2adfa3b | 2015-05-20 21:03:03 +0000 | [diff] [blame] | 101 | jobs 0 Number of jobs to run. If jobs >= 1 we spawn this number of jobs in separate worker processes with stdout/stderr redirected to fuzz-JOB.log. |
| 102 | workers 0 Number of simultaneous worker processes to run the jobs. If zero, "min(jobs,NumberOfCpuCores()/2)" is used. |
Kostya Serebryany | b17e298 | 2015-07-31 21:48:10 +0000 | [diff] [blame] | 103 | use_traces 0 Experimental: use instruction traces |
Kostya Serebryany | bc7c0ad | 2015-08-11 01:44:42 +0000 | [diff] [blame] | 104 | only_ascii 0 If 1, generate only ASCII (isprint+isspace) inputs. |
Kostya Serebryany | bd5d1cd | 2015-10-09 03:57:59 +0000 | [diff] [blame] | 105 | artifact_prefix "" Write fuzzing artifacts (crash, timeout, or slow inputs) as $(artifact_prefix)file |
Kostya Serebryany | 2d0ef14 | 2015-11-25 21:40:46 +0000 | [diff] [blame] | 106 | exact_artifact_path "" Write the single artifact on failure (crash, timeout) as $(exact_artifact_path). This overrides -artifact_prefix and will not use checksum in the file name. Do not use the same path for several parallel processes. |
Kostya Serebryany | 3c767db | 2016-02-27 05:45:12 +0000 | [diff] [blame] | 107 | print_final_stats 0 If 1, print statistics at exit. |
Kostya Serebryany | 9e1a238 | 2016-03-29 23:07:36 +0000 | [diff] [blame^] | 108 | close_fd_mask 0 If 1, close stdout at startup; if 2, close stderr; if 3, close both. Be careful, this will also close e.g. asan's stderr/stdout. |
Kostya Serebryany | 2adfa3b | 2015-05-20 21:03:03 +0000 | [diff] [blame] | 109 | |
| 110 | For the full list of flags run the fuzzer binary with ``-help=1``. |
| 111 | |
Kostya Serebryany | 7967738 | 2015-03-31 21:39:38 +0000 | [diff] [blame] | 112 | Usage examples |
| 113 | ============== |
Kostya Serebryany | d11dc17 | 2016-03-12 02:56:25 +0000 | [diff] [blame] | 114 | .. contents:: |
| 115 | :local: |
| 116 | :depth: 1 |
Kostya Serebryany | 7967738 | 2015-03-31 21:39:38 +0000 | [diff] [blame] | 117 | |
| 118 | Toy example |
| 119 | ----------- |
| 120 | |
| 121 | A simple function that does something interesting if it receives the input "HI!":: |
| 122 | |
| 123 | cat << EOF >> test_fuzzer.cc |
Kostya Serebryany | 1c80b9d | 2015-11-26 00:12:57 +0000 | [diff] [blame] | 124 | #include <stdint.h> |
| 125 | #include <stddef.h> |
| 126 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { |
Kostya Serebryany | 7967738 | 2015-03-31 21:39:38 +0000 | [diff] [blame] | 127 | if (size > 0 && data[0] == 'H') |
| 128 | if (size > 1 && data[1] == 'I') |
| 129 | if (size > 2 && data[2] == '!') |
| 130 | __builtin_trap(); |
Kostya Serebryany | 20bb5e7 | 2015-10-02 23:34:06 +0000 | [diff] [blame] | 131 | return 0; |
Kostya Serebryany | 7967738 | 2015-03-31 21:39:38 +0000 | [diff] [blame] | 132 | } |
| 133 | EOF |
Kostya Serebryany | abca88e | 2016-03-12 03:05:37 +0000 | [diff] [blame] | 134 | # Build test_fuzzer.cc with asan and link against libFuzzer.a |
| 135 | clang++ -fsanitize=address -fsanitize-coverage=edge test_fuzzer.cc libFuzzer.a |
Kostya Serebryany | 7967738 | 2015-03-31 21:39:38 +0000 | [diff] [blame] | 136 | # Run the fuzzer with no corpus. |
| 137 | ./a.out |
| 138 | |
Kostya Serebryany | abca88e | 2016-03-12 03:05:37 +0000 | [diff] [blame] | 139 | You should get an error pretty quickly:: |
| 140 | |
| 141 | #0 READ units: 1 exec/s: 0 |
| 142 | #1 INITED cov: 3 units: 1 exec/s: 0 |
| 143 | #2 NEW cov: 5 units: 2 exec/s: 0 L: 64 MS: 0 |
| 144 | #19237 NEW cov: 9 units: 3 exec/s: 0 L: 64 MS: 0 |
| 145 | #20595 NEW cov: 10 units: 4 exec/s: 0 L: 1 MS: 4 ChangeASCIIInt-ShuffleBytes-ChangeByte-CrossOver- |
| 146 | #34574 NEW cov: 13 units: 5 exec/s: 0 L: 2 MS: 3 ShuffleBytes-CrossOver-ChangeBit- |
| 147 | #34807 NEW cov: 15 units: 6 exec/s: 0 L: 3 MS: 1 CrossOver- |
| 148 | ==31511== ERROR: libFuzzer: deadly signal |
| 149 | ... |
| 150 | artifact_prefix='./'; Test unit written to ./crash-b13e8756b13a00cf168300179061fb4b91fefbed |
| 151 | |
Kostya Serebryany | 7967738 | 2015-03-31 21:39:38 +0000 | [diff] [blame] | 152 | |
| 153 | PCRE2 |
| 154 | ----- |
| 155 | |
Kostya Serebryany | abca88e | 2016-03-12 03:05:37 +0000 | [diff] [blame] | 156 | Here we show how to use libFuzzer on something real, yet simple: pcre2_:: |
Kostya Serebryany | 7967738 | 2015-03-31 21:39:38 +0000 | [diff] [blame] | 157 | |
Alexey Samsonov | 21a3381 | 2015-05-07 23:33:24 +0000 | [diff] [blame] | 158 | COV_FLAGS=" -fsanitize-coverage=edge,indirect-calls,8bit-counters" |
Kostya Serebryany | 7967738 | 2015-03-31 21:39:38 +0000 | [diff] [blame] | 159 | # Get PCRE2 |
| 160 | svn co svn://vcs.exim.org/pcre2/code/trunk pcre |
Kostya Serebryany | 7967738 | 2015-03-31 21:39:38 +0000 | [diff] [blame] | 161 | # Build PCRE2 with AddressSanitizer and coverage. |
| 162 | (cd pcre; ./autogen.sh; CC="clang -fsanitize=address $COV_FLAGS" ./configure --prefix=`pwd`/../inst && make -j && make install) |
Kostya Serebryany | abca88e | 2016-03-12 03:05:37 +0000 | [diff] [blame] | 163 | # Build the fuzzing target function that does something interesting with PCRE2. |
Kostya Serebryany | 7967738 | 2015-03-31 21:39:38 +0000 | [diff] [blame] | 164 | cat << EOF > pcre_fuzzer.cc |
| 165 | #include <string.h> |
Kostya Serebryany | 1c80b9d | 2015-11-26 00:12:57 +0000 | [diff] [blame] | 166 | #include <stdint.h> |
Kostya Serebryany | 7967738 | 2015-03-31 21:39:38 +0000 | [diff] [blame] | 167 | #include "pcre2posix.h" |
Kostya Serebryany | 1c80b9d | 2015-11-26 00:12:57 +0000 | [diff] [blame] | 168 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { |
Kostya Serebryany | 20bb5e7 | 2015-10-02 23:34:06 +0000 | [diff] [blame] | 169 | if (size < 1) return 0; |
Kostya Serebryany | 7967738 | 2015-03-31 21:39:38 +0000 | [diff] [blame] | 170 | char *str = new char[size+1]; |
| 171 | memcpy(str, data, size); |
| 172 | str[size] = 0; |
| 173 | regex_t preg; |
| 174 | if (0 == regcomp(&preg, str, 0)) { |
| 175 | regexec(&preg, str, 0, 0, 0); |
| 176 | regfree(&preg); |
| 177 | } |
| 178 | delete [] str; |
Kostya Serebryany | 20bb5e7 | 2015-10-02 23:34:06 +0000 | [diff] [blame] | 179 | return 0; |
Kostya Serebryany | 7967738 | 2015-03-31 21:39:38 +0000 | [diff] [blame] | 180 | } |
| 181 | EOF |
| 182 | clang++ -g -fsanitize=address $COV_FLAGS -c -std=c++11 -I inst/include/ pcre_fuzzer.cc |
| 183 | # Link. |
Kostya Serebryany | abca88e | 2016-03-12 03:05:37 +0000 | [diff] [blame] | 184 | clang++ -g -fsanitize=address -Wl,--whole-archive inst/lib/*.a -Wl,-no-whole-archive libFuzzer.a pcre_fuzzer.o -o pcre_fuzzer |
Kostya Serebryany | 7967738 | 2015-03-31 21:39:38 +0000 | [diff] [blame] | 185 | |
| 186 | This will give you a binary of the fuzzer, called ``pcre_fuzzer``. |
| 187 | Now, create a directory that will hold the test corpus:: |
| 188 | |
| 189 | mkdir -p CORPUS |
| 190 | |
| 191 | For simple input languages like regular expressions this is all you need. |
| 192 | For more complicated inputs populate the directory with some input samples. |
| 193 | Now run the fuzzer with the corpus dir as the only parameter:: |
| 194 | |
| 195 | ./pcre_fuzzer ./CORPUS |
| 196 | |
| 197 | You will see output like this:: |
| 198 | |
| 199 | Seed: 1876794929 |
| 200 | #0 READ cov 0 bits 0 units 1 exec/s 0 |
| 201 | #1 pulse cov 3 bits 0 units 1 exec/s 0 |
| 202 | #1 INITED cov 3 bits 0 units 1 exec/s 0 |
| 203 | #2 pulse cov 208 bits 0 units 1 exec/s 0 |
| 204 | #2 NEW cov 208 bits 0 units 2 exec/s 0 L: 64 |
| 205 | #3 NEW cov 217 bits 0 units 3 exec/s 0 L: 63 |
| 206 | #4 pulse cov 217 bits 0 units 3 exec/s 0 |
| 207 | |
| 208 | * The ``Seed:`` line shows you the current random seed (you can change it with ``-seed=N`` flag). |
| 209 | * The ``READ`` line shows you how many input files were read (since you passed an empty dir there were inputs, but one dummy input was synthesised). |
| 210 | * The ``INITED`` line shows you that how many inputs will be fuzzed. |
| 211 | * The ``NEW`` lines appear with the fuzzer finds a new interesting input, which is saved to the CORPUS dir. If multiple corpus dirs are given, the first one is used. |
| 212 | * The ``pulse`` lines appear periodically to show the current status. |
| 213 | |
| 214 | Now, interrupt the fuzzer and run it again the same way. You will see:: |
| 215 | |
| 216 | Seed: 1879995378 |
| 217 | #0 READ cov 0 bits 0 units 564 exec/s 0 |
| 218 | #1 pulse cov 502 bits 0 units 564 exec/s 0 |
| 219 | ... |
| 220 | #512 pulse cov 2933 bits 0 units 564 exec/s 512 |
| 221 | #564 INITED cov 2991 bits 0 units 344 exec/s 564 |
| 222 | #1024 pulse cov 2991 bits 0 units 344 exec/s 1024 |
| 223 | #1455 NEW cov 2995 bits 0 units 345 exec/s 1455 L: 49 |
| 224 | |
| 225 | This time you were running the fuzzer with a non-empty input corpus (564 items). |
| 226 | As the first step, the fuzzer minimized the set to produce 344 interesting items (the ``INITED`` line) |
| 227 | |
| 228 | You may run ``N`` independent fuzzer jobs in parallel on ``M`` CPUs:: |
| 229 | |
| 230 | N=100; M=4; ./pcre_fuzzer ./CORPUS -jobs=$N -workers=$M |
| 231 | |
Kostya Serebryany | 9690fcf | 2015-05-12 18:51:57 +0000 | [diff] [blame] | 232 | By default (``-reload=1``) the fuzzer processes will periodically scan the CORPUS directory |
| 233 | and reload any new tests. This way the test inputs found by one process will be picked up |
| 234 | by all others. |
Kostya Serebryany | 7967738 | 2015-03-31 21:39:38 +0000 | [diff] [blame] | 235 | |
Kostya Serebryany | 9690fcf | 2015-05-12 18:51:57 +0000 | [diff] [blame] | 236 | If ``-workers=$M`` is not supplied, ``min($N,NumberOfCpuCore/2)`` will be used. |
Kostya Serebryany | 7967738 | 2015-03-31 21:39:38 +0000 | [diff] [blame] | 237 | |
Kostya Serebryany | 5e593a4 | 2015-04-08 06:16:11 +0000 | [diff] [blame] | 238 | Heartbleed |
| 239 | ---------- |
| 240 | Remember Heartbleed_? |
| 241 | As it was recently `shown <https://blog.hboeck.de/archives/868-How-Heartbleed-couldve-been-found.html>`_, |
| 242 | fuzzing with AddressSanitizer can find Heartbleed. Indeed, here are the step-by-step instructions |
| 243 | to find Heartbleed with LibFuzzer:: |
| 244 | |
| 245 | wget https://www.openssl.org/source/openssl-1.0.1f.tar.gz |
| 246 | tar xf openssl-1.0.1f.tar.gz |
Alexey Samsonov | 21a3381 | 2015-05-07 23:33:24 +0000 | [diff] [blame] | 247 | COV_FLAGS="-fsanitize-coverage=edge,indirect-calls" # -fsanitize-coverage=8bit-counters |
Kostya Serebryany | 5e593a4 | 2015-04-08 06:16:11 +0000 | [diff] [blame] | 248 | (cd openssl-1.0.1f/ && ./config && |
| 249 | make -j 32 CC="clang -g -fsanitize=address $COV_FLAGS") |
| 250 | # Get and build LibFuzzer |
| 251 | svn co http://llvm.org/svn/llvm-project/llvm/trunk/lib/Fuzzer |
| 252 | clang -c -g -O2 -std=c++11 Fuzzer/*.cpp -IFuzzer |
| 253 | # Get examples of key/pem files. |
| 254 | git clone https://github.com/hannob/selftls |
| 255 | cp selftls/server* . -v |
| 256 | cat << EOF > handshake-fuzz.cc |
| 257 | #include <openssl/ssl.h> |
| 258 | #include <openssl/err.h> |
| 259 | #include <assert.h> |
Kostya Serebryany | 1c80b9d | 2015-11-26 00:12:57 +0000 | [diff] [blame] | 260 | #include <stdint.h> |
| 261 | #include <stddef.h> |
| 262 | |
Kostya Serebryany | 5e593a4 | 2015-04-08 06:16:11 +0000 | [diff] [blame] | 263 | SSL_CTX *sctx; |
| 264 | int Init() { |
| 265 | SSL_library_init(); |
| 266 | SSL_load_error_strings(); |
| 267 | ERR_load_BIO_strings(); |
| 268 | OpenSSL_add_all_algorithms(); |
| 269 | assert (sctx = SSL_CTX_new(TLSv1_method())); |
| 270 | assert (SSL_CTX_use_certificate_file(sctx, "server.pem", SSL_FILETYPE_PEM)); |
| 271 | assert (SSL_CTX_use_PrivateKey_file(sctx, "server.key", SSL_FILETYPE_PEM)); |
| 272 | return 0; |
| 273 | } |
Kostya Serebryany | 1c80b9d | 2015-11-26 00:12:57 +0000 | [diff] [blame] | 274 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { |
Kostya Serebryany | 5e593a4 | 2015-04-08 06:16:11 +0000 | [diff] [blame] | 275 | static int unused = Init(); |
| 276 | SSL *server = SSL_new(sctx); |
| 277 | BIO *sinbio = BIO_new(BIO_s_mem()); |
| 278 | BIO *soutbio = BIO_new(BIO_s_mem()); |
| 279 | SSL_set_bio(server, sinbio, soutbio); |
| 280 | SSL_set_accept_state(server); |
| 281 | BIO_write(sinbio, Data, Size); |
| 282 | SSL_do_handshake(server); |
| 283 | SSL_free(server); |
Kostya Serebryany | 20bb5e7 | 2015-10-02 23:34:06 +0000 | [diff] [blame] | 284 | return 0; |
Kostya Serebryany | 5e593a4 | 2015-04-08 06:16:11 +0000 | [diff] [blame] | 285 | } |
| 286 | EOF |
Mehdi Amini | 30618f9 | 2015-09-17 15:59:52 +0000 | [diff] [blame] | 287 | # Build the fuzzer. |
Kostya Serebryany | 5e593a4 | 2015-04-08 06:16:11 +0000 | [diff] [blame] | 288 | clang++ -g handshake-fuzz.cc -fsanitize=address \ |
| 289 | openssl-1.0.1f/libssl.a openssl-1.0.1f/libcrypto.a Fuzzer*.o |
| 290 | # Run 20 independent fuzzer jobs. |
| 291 | ./a.out -jobs=20 -workers=20 |
| 292 | |
| 293 | Voila:: |
| 294 | |
| 295 | #1048576 pulse cov 3424 bits 0 units 9 exec/s 24385 |
| 296 | ================================================================= |
| 297 | ==17488==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x629000004748 at pc 0x00000048c979 bp 0x7fffe3e864f0 sp 0x7fffe3e85ca8 |
| 298 | READ of size 60731 at 0x629000004748 thread T0 |
| 299 | #0 0x48c978 in __asan_memcpy |
| 300 | #1 0x4db504 in tls1_process_heartbeat openssl-1.0.1f/ssl/t1_lib.c:2586:3 |
| 301 | #2 0x580be3 in ssl3_read_bytes openssl-1.0.1f/ssl/s3_pkt.c:1092:4 |
| 302 | |
Kostya Serebryany | 1c80b9d | 2015-11-26 00:12:57 +0000 | [diff] [blame] | 303 | Note: a `similar fuzzer <https://boringssl.googlesource.com/boringssl/+/HEAD/FUZZING.md>`_ |
| 304 | is now a part of the boringssl source tree. |
| 305 | |
Kostya Serebryany | 043ab1c | 2015-04-01 21:33:20 +0000 | [diff] [blame] | 306 | Advanced features |
| 307 | ================= |
Kostya Serebryany | d11dc17 | 2016-03-12 02:56:25 +0000 | [diff] [blame] | 308 | .. contents:: |
| 309 | :local: |
| 310 | :depth: 1 |
Kostya Serebryany | 043ab1c | 2015-04-01 21:33:20 +0000 | [diff] [blame] | 311 | |
Kostya Serebryany | 7d21166 | 2015-09-04 00:12:11 +0000 | [diff] [blame] | 312 | Dictionaries |
| 313 | ------------ |
Kostya Serebryany | 7d21166 | 2015-09-04 00:12:11 +0000 | [diff] [blame] | 314 | LibFuzzer supports user-supplied dictionaries with input language keywords |
| 315 | or other interesting byte sequences (e.g. multi-byte magic values). |
| 316 | Use ``-dict=DICTIONARY_FILE``. For some input languages using a dictionary |
| 317 | may significantly improve the search speed. |
| 318 | The dictionary syntax is similar to that used by AFL_ for its ``-x`` option:: |
| 319 | |
| 320 | # Lines starting with '#' and empty lines are ignored. |
| 321 | |
| 322 | # Adds "blah" (w/o quotes) to the dictionary. |
| 323 | kw1="blah" |
| 324 | # Use \\ for backslash and \" for quotes. |
| 325 | kw2="\"ac\\dc\"" |
| 326 | # Use \xAB for hex values |
| 327 | kw3="\xF7\xF8" |
| 328 | # the name of the keyword followed by '=' may be omitted: |
| 329 | "foo\x0Abar" |
| 330 | |
Kostya Serebryany | b17e298 | 2015-07-31 21:48:10 +0000 | [diff] [blame] | 331 | Data-flow-guided fuzzing |
| 332 | ------------------------ |
| 333 | |
| 334 | *EXPERIMENTAL*. |
| 335 | With an additional compiler flag ``-fsanitize-coverage=trace-cmp`` (see SanitizerCoverageTraceDataFlow_) |
| 336 | and extra run-time flag ``-use_traces=1`` the fuzzer will try to apply *data-flow-guided fuzzing*. |
| 337 | That is, the fuzzer will record the inputs to comparison instructions, switch statements, |
Kostya Serebryany | 7f4227d | 2015-08-05 18:23:01 +0000 | [diff] [blame] | 338 | and several libc functions (``memcmp``, ``strcmp``, ``strncmp``, etc). |
Kostya Serebryany | b17e298 | 2015-07-31 21:48:10 +0000 | [diff] [blame] | 339 | It will later use those recorded inputs during mutations. |
| 340 | |
| 341 | This mode can be combined with DataFlowSanitizer_ to achieve better sensitivity. |
| 342 | |
Kostya Serebryany | 6bd016b | 2015-04-10 05:44:43 +0000 | [diff] [blame] | 343 | AFL compatibility |
| 344 | ----------------- |
Kostya Serebryany | 9e1a238 | 2016-03-29 23:07:36 +0000 | [diff] [blame^] | 345 | LibFuzzer can be used together with AFL_ on the same test corpus. |
Kostya Serebryany | 6bd016b | 2015-04-10 05:44:43 +0000 | [diff] [blame] | 346 | Both fuzzers expect the test corpus to reside in a directory, one file per input. |
Kostya Serebryany | 9e1a238 | 2016-03-29 23:07:36 +0000 | [diff] [blame^] | 347 | You can run both fuzzers on the same corpus, one after another:: |
Kostya Serebryany | 6bd016b | 2015-04-10 05:44:43 +0000 | [diff] [blame] | 348 | |
Kostya Serebryany | 9e1a238 | 2016-03-29 23:07:36 +0000 | [diff] [blame^] | 349 | ./afl-fuzz -i testcase_dir -o findings_dir /path/to/program @@ |
Kostya Serebryany | 6bd016b | 2015-04-10 05:44:43 +0000 | [diff] [blame] | 350 | ./llvm-fuzz testcase_dir findings_dir # Will write new tests to testcase_dir |
| 351 | |
| 352 | Periodically restart both fuzzers so that they can use each other's findings. |
Kostya Serebryany | 9e1a238 | 2016-03-29 23:07:36 +0000 | [diff] [blame^] | 353 | Currently, there is no simple way to run both fuzzing engines in parallel while sharing the same corpus dir. |
Kostya Serebryany | 7967738 | 2015-03-31 21:39:38 +0000 | [diff] [blame] | 354 | |
Kostya Serebryany | cd073d5 | 2015-04-10 06:32:29 +0000 | [diff] [blame] | 355 | How good is my fuzzer? |
| 356 | ---------------------- |
| 357 | |
Kostya Serebryany | 566bc5a | 2015-05-06 22:19:00 +0000 | [diff] [blame] | 358 | Once you implement your target function ``LLVMFuzzerTestOneInput`` and fuzz it to death, |
Kostya Serebryany | cd073d5 | 2015-04-10 06:32:29 +0000 | [diff] [blame] | 359 | you will want to know whether the function or the corpus can be improved further. |
| 360 | One easy to use metric is, of course, code coverage. |
| 361 | You can get the coverage for your corpus like this:: |
| 362 | |
Kostya Serebryany | 7ead926 | 2016-03-12 03:11:27 +0000 | [diff] [blame] | 363 | ASAN_OPTIONS=coverage=1 ./fuzzer CORPUS_DIR -runs=0 |
Kostya Serebryany | cd073d5 | 2015-04-10 06:32:29 +0000 | [diff] [blame] | 364 | |
| 365 | This will run all the tests in the CORPUS_DIR but will not generate any new tests |
| 366 | and dump covered PCs to disk before exiting. |
| 367 | Then you can subtract the set of covered PCs from the set of all instrumented PCs in the binary, |
| 368 | see SanitizerCoverage_ for details. |
| 369 | |
Kostya Serebryany | 926b9bd | 2015-05-22 22:43:05 +0000 | [diff] [blame] | 370 | User-supplied mutators |
| 371 | ---------------------- |
| 372 | |
| 373 | LibFuzzer allows to use custom (user-supplied) mutators, |
| 374 | see FuzzerInterface.h_ |
| 375 | |
Kostya Serebryany | aca7696 | 2016-01-16 01:23:12 +0000 | [diff] [blame] | 376 | Startup initialization |
| 377 | ---------------------- |
| 378 | If the library being tested needs to be initialized, there are several options. |
| 379 | |
| 380 | The simplest way is to have a statically initialized global object:: |
| 381 | |
| 382 | static bool Initialized = DoInitialization(); |
| 383 | |
| 384 | Alternatively, you may define an optional init function and it will receive |
| 385 | the program arguments that you can read and modify:: |
| 386 | |
| 387 | extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv) { |
| 388 | ReadAndMaybeModify(argc, argv); |
| 389 | return 0; |
| 390 | } |
| 391 | |
Kostya Serebryany | aca7696 | 2016-01-16 01:23:12 +0000 | [diff] [blame] | 392 | Try to avoid initialization inside the target function itself as |
| 393 | it will skew the coverage data. Don't do this:: |
| 394 | |
| 395 | extern "C" int LLVMFuzzerTestOneInput(...) { |
| 396 | static bool initialized = false; |
| 397 | if (!initialized) { |
| 398 | ... |
| 399 | } |
| 400 | } |
| 401 | |
Kostya Serebryany | 9e1a238 | 2016-03-29 23:07:36 +0000 | [diff] [blame^] | 402 | Leaks |
| 403 | ----- |
| 404 | |
| 405 | When running libFuzzer with AddressSanitizer_ the latter will be able to report |
| 406 | memory leaks, but only when the process exits, so if you suspect memory leaks |
| 407 | in your target you should run libFuzzer with `-runs=N` or `-max_total_time=N`. |
| 408 | If a leak is reported at the end, you will not get the reproducer from libFuzzer. |
| 409 | You will need to re-run the target on every file in the corpus separately to |
| 410 | find which one causes the leak. |
| 411 | |
| 412 | If your target has massive leaks you will eventually run out of RAM. |
| 413 | To protect your machine from OOM death you may use |
| 414 | e.g. `ASAN_OPTIONS=hard_rss_limit_mb=2000` (with AddressSanitizer_). |
| 415 | |
| 416 | In future libFuzzer may support finding/reporting leaks better than this, stay tuned. |
| 417 | |
Kostya Serebryany | 7967738 | 2015-03-31 21:39:38 +0000 | [diff] [blame] | 418 | Fuzzing components of LLVM |
| 419 | ========================== |
Kostya Serebryany | d11dc17 | 2016-03-12 02:56:25 +0000 | [diff] [blame] | 420 | .. contents:: |
| 421 | :local: |
| 422 | :depth: 1 |
Kostya Serebryany | 35ce863 | 2015-03-30 23:05:30 +0000 | [diff] [blame] | 423 | |
| 424 | clang-format-fuzzer |
| 425 | ------------------- |
| 426 | The inputs are random pieces of C++-like text. |
| 427 | |
| 428 | Build (make sure to use fresh clang as the host compiler):: |
| 429 | |
| 430 | cmake -GNinja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_USE_SANITIZER=Address -DLLVM_USE_SANITIZE_COVERAGE=YES -DCMAKE_BUILD_TYPE=Release /path/to/llvm |
| 431 | ninja clang-format-fuzzer |
| 432 | mkdir CORPUS_DIR |
| 433 | ./bin/clang-format-fuzzer CORPUS_DIR |
| 434 | |
| 435 | Optionally build other kinds of binaries (asan+Debug, msan, ubsan, etc). |
| 436 | |
Kostya Serebryany | 7967738 | 2015-03-31 21:39:38 +0000 | [diff] [blame] | 437 | Tracking bug: https://llvm.org/bugs/show_bug.cgi?id=23052 |
Kostya Serebryany | 35ce863 | 2015-03-30 23:05:30 +0000 | [diff] [blame] | 438 | |
Kostya Serebryany | 7967738 | 2015-03-31 21:39:38 +0000 | [diff] [blame] | 439 | clang-fuzzer |
| 440 | ------------ |
Kostya Serebryany | 35ce863 | 2015-03-30 23:05:30 +0000 | [diff] [blame] | 441 | |
Kostya Serebryany | 866e0d1 | 2015-09-02 22:44:46 +0000 | [diff] [blame] | 442 | The behavior is very similar to ``clang-format-fuzzer``. |
Kostya Serebryany | 7967738 | 2015-03-31 21:39:38 +0000 | [diff] [blame] | 443 | |
| 444 | Tracking bug: https://llvm.org/bugs/show_bug.cgi?id=23057 |
Kostya Serebryany | 35ce863 | 2015-03-30 23:05:30 +0000 | [diff] [blame] | 445 | |
Kostya Serebryany | b98e327 | 2015-08-31 18:57:24 +0000 | [diff] [blame] | 446 | llvm-as-fuzzer |
| 447 | -------------- |
| 448 | |
| 449 | Tracking bug: https://llvm.org/bugs/show_bug.cgi?id=24639 |
| 450 | |
Daniel Sanders | 5151b20 | 2015-09-18 10:47:45 +0000 | [diff] [blame] | 451 | llvm-mc-fuzzer |
| 452 | -------------- |
| 453 | |
| 454 | This tool fuzzes the MC layer. Currently it is only able to fuzz the |
| 455 | disassembler but it is hoped that assembly, and round-trip verification will be |
| 456 | added in future. |
| 457 | |
| 458 | When run in dissassembly mode, the inputs are opcodes to be disassembled. The |
| 459 | fuzzer will consume as many instructions as possible and will stop when it |
| 460 | finds an invalid instruction or runs out of data. |
| 461 | |
Daniel Sanders | 4fe1c8b | 2015-09-26 17:09:01 +0000 | [diff] [blame] | 462 | Please note that the command line interface differs slightly from that of other |
| 463 | fuzzers. The fuzzer arguments should follow ``--fuzzer-args`` and should have |
| 464 | a single dash, while other arguments control the operation mode and target in a |
| 465 | similar manner to ``llvm-mc`` and should have two dashes. For example:: |
Daniel Sanders | 5151b20 | 2015-09-18 10:47:45 +0000 | [diff] [blame] | 466 | |
Daniel Sanders | 4fe1c8b | 2015-09-26 17:09:01 +0000 | [diff] [blame] | 467 | llvm-mc-fuzzer --triple=aarch64-linux-gnu --disassemble --fuzzer-args -max_len=4 -jobs=10 |
Daniel Sanders | 5151b20 | 2015-09-18 10:47:45 +0000 | [diff] [blame] | 468 | |
Kostya Serebryany | fb2f331 | 2015-05-13 22:42:28 +0000 | [diff] [blame] | 469 | Buildbot |
| 470 | -------- |
| 471 | |
| 472 | We have a buildbot that runs the above fuzzers for LLVM components |
| 473 | 24/7/365 at http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer . |
| 474 | |
Kostya Serebryany | 35ce863 | 2015-03-30 23:05:30 +0000 | [diff] [blame] | 475 | FAQ |
| 476 | ========================= |
| 477 | |
Kostya Serebryany | 241fb61 | 2016-03-12 03:23:02 +0000 | [diff] [blame] | 478 | Q. Why libFuzzer does not use any of the LLVM support? |
| 479 | ------------------------------------------------------ |
Kostya Serebryany | 35ce863 | 2015-03-30 23:05:30 +0000 | [diff] [blame] | 480 | |
| 481 | There are two reasons. |
| 482 | |
| 483 | First, we want this library to be used outside of the LLVM w/o users having to |
| 484 | build the rest of LLVM. This may sound unconvincing for many LLVM folks, |
| 485 | but in practice the need for building the whole LLVM frightens many potential |
| 486 | users -- and we want more users to use this code. |
| 487 | |
| 488 | Second, there is a subtle technical reason not to rely on the rest of LLVM, or |
| 489 | any other large body of code (maybe not even STL). When coverage instrumentation |
| 490 | is enabled, it will also instrument the LLVM support code which will blow up the |
| 491 | coverage set of the process (since the fuzzer is in-process). In other words, by |
| 492 | using more external dependencies we will slow down the fuzzer while the main |
| 493 | reason for it to exist is extreme speed. |
| 494 | |
| 495 | Q. What about Windows then? The Fuzzer contains code that does not build on Windows. |
| 496 | ------------------------------------------------------------------------------------ |
| 497 | |
Kostya Serebryany | 241fb61 | 2016-03-12 03:23:02 +0000 | [diff] [blame] | 498 | Volunteers are welcome. |
Kostya Serebryany | 35ce863 | 2015-03-30 23:05:30 +0000 | [diff] [blame] | 499 | |
| 500 | Q. When this Fuzzer is not a good solution for a problem? |
| 501 | --------------------------------------------------------- |
| 502 | |
| 503 | * If the test inputs are validated by the target library and the validator |
Kostya Serebryany | 241fb61 | 2016-03-12 03:23:02 +0000 | [diff] [blame] | 504 | asserts/crashes on invalid inputs, in-process fuzzing is not applicable. |
Kostya Serebryany | 35ce863 | 2015-03-30 23:05:30 +0000 | [diff] [blame] | 505 | * Bugs in the target library may accumulate w/o being detected. E.g. a memory |
| 506 | corruption that goes undetected at first and then leads to a crash while |
| 507 | testing another input. This is why it is highly recommended to run this |
| 508 | in-process fuzzer with all sanitizers to detect most bugs on the spot. |
| 509 | * It is harder to protect the in-process fuzzer from excessive memory |
| 510 | consumption and infinite loops in the target library (still possible). |
| 511 | * The target library should not have significant global state that is not |
| 512 | reset between the runs. |
| 513 | * Many interesting target libs are not designed in a way that supports |
| 514 | the in-process fuzzer interface (e.g. require a file path instead of a |
| 515 | byte array). |
| 516 | * If a single test run takes a considerable fraction of a second (or |
| 517 | more) the speed benefit from the in-process fuzzer is negligible. |
| 518 | * If the target library runs persistent threads (that outlive |
| 519 | execution of one test) the fuzzing results will be unreliable. |
| 520 | |
| 521 | Q. So, what exactly this Fuzzer is good for? |
| 522 | -------------------------------------------- |
| 523 | |
| 524 | This Fuzzer might be a good choice for testing libraries that have relatively |
Kostya Serebryany | 241fb61 | 2016-03-12 03:23:02 +0000 | [diff] [blame] | 525 | small inputs, each input takes < 10ms to run, and the library code is not expected |
Kostya Serebryany | 35ce863 | 2015-03-30 23:05:30 +0000 | [diff] [blame] | 526 | to crash on invalid inputs. |
Kostya Serebryany | 241fb61 | 2016-03-12 03:23:02 +0000 | [diff] [blame] | 527 | Examples: regular expression matchers, text or binary format parsers, compression, |
| 528 | network, crypto. |
Kostya Serebryany | 35ce863 | 2015-03-30 23:05:30 +0000 | [diff] [blame] | 529 | |
Kostya Serebryany | fab4fba | 2015-08-11 01:53:45 +0000 | [diff] [blame] | 530 | Trophies |
| 531 | ======== |
| 532 | * GLIBC: https://sourceware.org/glibc/wiki/FuzzingLibc |
Kostya Serebryany | fdf4418 | 2015-08-11 04:16:37 +0000 | [diff] [blame] | 533 | |
Kostya Serebryany | fab4fba | 2015-08-11 01:53:45 +0000 | [diff] [blame] | 534 | * MUSL LIBC: |
Kostya Serebryany | fdf4418 | 2015-08-11 04:16:37 +0000 | [diff] [blame] | 535 | |
| 536 | * http://git.musl-libc.org/cgit/musl/commit/?id=39dfd58417ef642307d90306e1c7e50aaec5a35c |
| 537 | * http://www.openwall.com/lists/oss-security/2015/03/30/3 |
| 538 | |
Kostya Serebryany | 928eb33 | 2015-10-12 18:15:42 +0000 | [diff] [blame] | 539 | * `pugixml <https://github.com/zeux/pugixml/issues/39>`_ |
Kostya Serebryany | fdf4418 | 2015-08-11 04:16:37 +0000 | [diff] [blame] | 540 | |
Kostya Serebryany | 45dac2a | 2015-10-10 02:14:18 +0000 | [diff] [blame] | 541 | * PCRE: Search for "LLVM fuzzer" in http://vcs.pcre.org/pcre2/code/trunk/ChangeLog?view=markup; |
Kostya Serebryany | 928eb33 | 2015-10-12 18:15:42 +0000 | [diff] [blame] | 542 | also in `bugzilla <https://bugs.exim.org/buglist.cgi?bug_status=__all__&content=libfuzzer&no_redirect=1&order=Importance&product=PCRE&query_format=specific>`_ |
Kostya Serebryany | fdf4418 | 2015-08-11 04:16:37 +0000 | [diff] [blame] | 543 | |
Kostya Serebryany | 928eb33 | 2015-10-12 18:15:42 +0000 | [diff] [blame] | 544 | * `ICU <http://bugs.icu-project.org/trac/ticket/11838>`_ |
Kostya Serebryany | ed48377 | 2015-08-11 20:34:48 +0000 | [diff] [blame] | 545 | |
Kostya Serebryany | 928eb33 | 2015-10-12 18:15:42 +0000 | [diff] [blame] | 546 | * `Freetype <https://savannah.nongnu.org/search/?words=LibFuzzer&type_of_search=bugs&Search=Search&exact=1#options>`_ |
Kostya Serebryany | 6292128 | 2015-09-11 16:34:14 +0000 | [diff] [blame] | 547 | |
Kostya Serebryany | 928eb33 | 2015-10-12 18:15:42 +0000 | [diff] [blame] | 548 | * `Harfbuzz <https://github.com/behdad/harfbuzz/issues/139>`_ |
| 549 | |
Kostya Serebryany | 240a159 | 2015-11-11 05:25:24 +0000 | [diff] [blame] | 550 | * `SQLite <http://www3.sqlite.org/cgi/src/info/088009efdd56160b>`_ |
Kostya Serebryany | 65e7126 | 2015-11-11 05:20:55 +0000 | [diff] [blame] | 551 | |
Kostya Serebryany | 12fa3b5 | 2015-11-13 02:44:16 +0000 | [diff] [blame] | 552 | * `Python <http://bugs.python.org/issue25388>`_ |
| 553 | |
Kostya Serebryany | 2cf9082 | 2016-03-19 01:05:33 +0000 | [diff] [blame] | 554 | * OpenSSL/BoringSSL: `[1] <https://boringssl.googlesource.com/boringssl/+/cb852981cd61733a7a1ae4fd8755b7ff950e857d>`_ `[2] <https://openssl.org/news/secadv/20160301.txt>`_ `[3] <https://boringssl.googlesource.com/boringssl/+/2b07fa4b22198ac02e0cee8f37f3337c3dba91bc>`_ `[4] <https://boringssl.googlesource.com/boringssl/+/6b6e0b20893e2be0e68af605a60ffa2cbb0ffa64>`_ |
Kostya Serebryany | 064a672 | 2015-12-05 02:23:49 +0000 | [diff] [blame] | 555 | |
Kostya Serebryany | 928eb33 | 2015-10-12 18:15:42 +0000 | [diff] [blame] | 556 | * `Libxml2 |
| 557 | <https://bugzilla.gnome.org/buglist.cgi?bug_status=__all__&content=libFuzzer&list_id=68957&order=Importance&product=libxml2&query_format=specific>`_ |
Kostya Serebryany | 45dac2a | 2015-10-10 02:14:18 +0000 | [diff] [blame] | 558 | |
Kostya Serebryany | 240a159 | 2015-11-11 05:25:24 +0000 | [diff] [blame] | 559 | * `Linux Kernel's BPF verifier <https://github.com/iovisor/bpf-fuzzer>`_ |
Kostya Serebryany | 6292128 | 2015-09-11 16:34:14 +0000 | [diff] [blame] | 560 | |
Kostya Serebryany | 240a159 | 2015-11-11 05:25:24 +0000 | [diff] [blame] | 561 | * LLVM: `Clang <https://llvm.org/bugs/show_bug.cgi?id=23057>`_, `Clang-format <https://llvm.org/bugs/show_bug.cgi?id=23052>`_, `libc++ <https://llvm.org/bugs/show_bug.cgi?id=24411>`_, `llvm-as <https://llvm.org/bugs/show_bug.cgi?id=24639>`_, Disassembler: http://reviews.llvm.org/rL247405, http://reviews.llvm.org/rL247414, http://reviews.llvm.org/rL247416, http://reviews.llvm.org/rL247417, http://reviews.llvm.org/rL247420, http://reviews.llvm.org/rL247422. |
Kostya Serebryany | fab4fba | 2015-08-11 01:53:45 +0000 | [diff] [blame] | 562 | |
Kostya Serebryany | 7967738 | 2015-03-31 21:39:38 +0000 | [diff] [blame] | 563 | .. _pcre2: http://www.pcre.org/ |
| 564 | |
| 565 | .. _AFL: http://lcamtuf.coredump.cx/afl/ |
| 566 | |
Alexey Samsonov | 675e539 | 2015-04-27 22:50:06 +0000 | [diff] [blame] | 567 | .. _SanitizerCoverage: http://clang.llvm.org/docs/SanitizerCoverage.html |
Kostya Serebryany | b17e298 | 2015-07-31 21:48:10 +0000 | [diff] [blame] | 568 | .. _SanitizerCoverageTraceDataFlow: http://clang.llvm.org/docs/SanitizerCoverage.html#tracing-data-flow |
| 569 | .. _DataFlowSanitizer: http://clang.llvm.org/docs/DataFlowSanitizer.html |
Kostya Serebryany | 9e1a238 | 2016-03-29 23:07:36 +0000 | [diff] [blame^] | 570 | .. _AddressSanitizer: http://clang.llvm.org/docs/AddressSanitizer.html |
Kostya Serebryany | 5e593a4 | 2015-04-08 06:16:11 +0000 | [diff] [blame] | 571 | |
| 572 | .. _Heartbleed: http://en.wikipedia.org/wiki/Heartbleed |
Kostya Serebryany | 926b9bd | 2015-05-22 22:43:05 +0000 | [diff] [blame] | 573 | |
| 574 | .. _FuzzerInterface.h: https://github.com/llvm-mirror/llvm/blob/master/lib/Fuzzer/FuzzerInterface.h |