[[https://labsblog.f-secure.com/2017/06/22/super-awesome-fuzzing-part-one/|Super Awesome Fuzzing, Part One]] {{ :prog:clang:super_awesome_fuzzing_part_one_-_f-secure_blog_2020-02-13_22_52_43_.html |Archive du 22/06/2017 le 13/02/2020}} [[https://raw.githubusercontent.com/google/fuzzer-test-suite/master/tutorial/fuzz_me.cc|fuzz_me.c]] {{ :prog:clang:fuzz_me.cc |Archive}} Il faut créer un fichier source qui ne contient qu'une seule fonction. La fonction ''main'' est dans l'archive statique ''libFuzzer.a''. extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size); L'option de compilation ''-fsanitize=fuzzer'' est obligatoire mais il peut être utile de rajouter ''-fno-omit-frame-pointer -g -fsanitize=address,undefined''. clang++ -fno-omit-frame-pointer -g -fsanitize=address,undefined,fuzzer fuzz_me.cc ===Messages d'erreur=== * error adding symbols: DSO missing from command line Il faut rajouter ''-lgcc_s''. [[https://github.com/google/fuzzing/blob/master/tutorial/libFuzzerTutorial.md|Pour aller plus loin]], même si ça possède de nombreuses fonctionnalités, je préfère [[prog:fuzzer:afl|afl]] mais une étude comparative va finir par s'imposer. {{ :prog:clang:fuzzing_libfuzzertutorial.md_at_master_google_fuzzing_2020-02-13_22_51_09_.html |Archive du 27/09/2020 le 13/02/2020}}