| # Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
| # |
| # Use of this source code is governed by a BSD-style license |
| # that can be found in the LICENSE file in the root of the source |
| # tree. An additional intellectual property rights grant can be found |
| # in the file PATENTS. All contributing project authors may |
| # be found in the AUTHORS file in the root of the source tree. |
| |
| import("../../webrtc.gni") |
| import("//build/config/features.gni") |
| import("//testing/libfuzzer/fuzzer_test.gni") |
| |
| rtc_static_library("webrtc_fuzzer_main") { |
| sources = [ |
| "webrtc_fuzzer_main.cc", |
| ] |
| deps = [ |
| "../../rtc_base:rtc_base_approved", |
| "../../system_wrappers:field_trial_default", |
| "../../system_wrappers:metrics_default", |
| "../../system_wrappers:runtime_enabled_features_default", |
| "//testing/libfuzzer:libfuzzer_main", |
| ] |
| } |
| |
| rtc_static_library("fuzz_data_helper") { |
| sources = [ |
| "fuzz_data_helper.cc", |
| "fuzz_data_helper.h", |
| ] |
| deps = [ |
| "../../api:array_view", |
| "../../modules/rtp_rtcp:rtp_rtcp_format", |
| ] |
| visibility = [ ":*" ] # Only targets in this file can depend on this. |
| } |
| |
| template("webrtc_fuzzer_test") { |
| fuzzer_test(target_name) { |
| forward_variables_from(invoker, "*") |
| deps += [ |
| ":fuzz_data_helper", |
| ":webrtc_fuzzer_main", |
| |
| # Link unconditionally with webrtc's TaskQueue, regardless of |
| # rtc_link_task_queue_impl flag. |
| "../../rtc_base:rtc_task_queue_impl", |
| ] |
| if (!build_with_chromium && is_clang) { |
| # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| suppressed_configs = [ "//build/config/clang:find_bad_constructs" ] |
| } |
| } |
| } |
| |
| webrtc_fuzzer_test("h264_depacketizer_fuzzer") { |
| sources = [ |
| "h264_depacketizer_fuzzer.cc", |
| ] |
| deps = [ |
| "../../modules/rtp_rtcp", |
| ] |
| } |
| |
| webrtc_fuzzer_test("vp8_depacketizer_fuzzer") { |
| sources = [ |
| "vp8_depacketizer_fuzzer.cc", |
| ] |
| deps = [ |
| "../../modules/rtp_rtcp", |
| ] |
| } |
| |
| webrtc_fuzzer_test("vp9_depacketizer_fuzzer") { |
| sources = [ |
| "vp9_depacketizer_fuzzer.cc", |
| ] |
| deps = [ |
| "../../modules/rtp_rtcp", |
| ] |
| } |
| |
| webrtc_fuzzer_test("vp8_qp_parser_fuzzer") { |
| sources = [ |
| "vp8_qp_parser_fuzzer.cc", |
| ] |
| deps = [ |
| "../../modules/video_coding:video_coding_utility", |
| "../../modules/video_coding/", |
| ] |
| } |
| |
| webrtc_fuzzer_test("vp9_qp_parser_fuzzer") { |
| sources = [ |
| "vp9_qp_parser_fuzzer.cc", |
| ] |
| deps = [ |
| "../../modules/video_coding:video_coding_utility", |
| "../../modules/video_coding/", |
| ] |
| } |
| |
| webrtc_fuzzer_test("h264_bitstream_parser_fuzzer") { |
| sources = [ |
| "h264_bitstream_parser_fuzzer.cc", |
| ] |
| deps = [ |
| "../../common_video", |
| "../../modules/video_coding/", |
| ] |
| } |
| |
| webrtc_fuzzer_test("forward_error_correction_fuzzer") { |
| sources = [ |
| "forward_error_correction_fuzzer.cc", |
| ] |
| deps = [ |
| "../../modules/rtp_rtcp", |
| "../../modules/rtp_rtcp:rtp_rtcp_format", |
| "../../rtc_base:rtc_base_approved", |
| ] |
| libfuzzer_options = [ "max_len=5000" ] |
| } |
| |
| webrtc_fuzzer_test("flexfec_header_reader_fuzzer") { |
| sources = [ |
| "flexfec_header_reader_fuzzer.cc", |
| ] |
| deps = [ |
| "../../modules/rtp_rtcp", |
| "../../modules/rtp_rtcp:rtp_rtcp_format", |
| "../../rtc_base:rtc_base_approved", |
| ] |
| } |
| |
| webrtc_fuzzer_test("flexfec_sender_fuzzer") { |
| sources = [ |
| "flexfec_sender_fuzzer.cc", |
| ] |
| deps = [ |
| "../../modules/rtp_rtcp", |
| "../../modules/rtp_rtcp:rtp_rtcp_format", |
| "../../system_wrappers", |
| ] |
| libfuzzer_options = [ "max_len=200" ] |
| } |
| |
| webrtc_fuzzer_test("ulpfec_header_reader_fuzzer") { |
| sources = [ |
| "ulpfec_header_reader_fuzzer.cc", |
| ] |
| deps = [ |
| "../../modules/rtp_rtcp", |
| "../../modules/rtp_rtcp:fec_test_helper", |
| "../../modules/rtp_rtcp:rtp_rtcp_format", |
| "../../rtc_base:rtc_base_approved", |
| ] |
| } |
| |
| webrtc_fuzzer_test("ulpfec_generator_fuzzer") { |
| sources = [ |
| "ulpfec_generator_fuzzer.cc", |
| ] |
| deps = [ |
| "../../modules/rtp_rtcp", |
| "../../modules/rtp_rtcp:fec_test_helper", |
| "../../modules/rtp_rtcp:rtp_rtcp_format", |
| "../../rtc_base:checks", |
| "../../rtc_base:rtc_base_approved", |
| ] |
| } |
| |
| webrtc_fuzzer_test("ulpfec_receiver_fuzzer") { |
| sources = [ |
| "ulpfec_receiver_fuzzer.cc", |
| ] |
| deps = [ |
| "../../modules/rtp_rtcp", |
| "../../modules/rtp_rtcp:rtp_rtcp_format", |
| "../../rtc_base:rtc_base_approved", |
| ] |
| libfuzzer_options = [ "max_len=2000" ] |
| } |
| |
| webrtc_fuzzer_test("flexfec_receiver_fuzzer") { |
| sources = [ |
| "flexfec_receiver_fuzzer.cc", |
| ] |
| deps = [ |
| "../../modules/rtp_rtcp", |
| "../../modules/rtp_rtcp:rtp_rtcp_format", |
| "../../rtc_base:rtc_base_approved", |
| ] |
| libfuzzer_options = [ "max_len=2000" ] |
| } |
| |
| webrtc_fuzzer_test("packet_buffer_fuzzer") { |
| sources = [ |
| "packet_buffer_fuzzer.cc", |
| ] |
| deps = [ |
| "../../modules/video_coding/", |
| "../../system_wrappers", |
| ] |
| libfuzzer_options = [ "max_len=200000" ] |
| } |
| |
| webrtc_fuzzer_test("rtcp_receiver_fuzzer") { |
| sources = [ |
| "rtcp_receiver_fuzzer.cc", |
| ] |
| deps = [ |
| "../../modules/rtp_rtcp", |
| "../../rtc_base:checks", |
| "../../rtc_base:rtc_base_approved", |
| "../../system_wrappers:system_wrappers", |
| ] |
| seed_corpus = "corpora/rtcp-corpus" |
| } |
| |
| webrtc_fuzzer_test("rtp_packet_fuzzer") { |
| sources = [ |
| "rtp_packet_fuzzer.cc", |
| ] |
| deps = [ |
| "../../modules/rtp_rtcp:rtp_rtcp_format", |
| ] |
| seed_corpus = "corpora/rtp-corpus" |
| } |
| |
| webrtc_fuzzer_test("rtp_header_fuzzer") { |
| sources = [ |
| "rtp_header_fuzzer.cc", |
| ] |
| deps = [ |
| "../../modules/rtp_rtcp", |
| "../../modules/rtp_rtcp:rtp_rtcp_format", |
| ] |
| } |
| |
| webrtc_fuzzer_test("congestion_controller_feedback_fuzzer") { |
| sources = [ |
| "congestion_controller_feedback_fuzzer.cc", |
| ] |
| deps = [ |
| "../../logging:rtc_event_log_api", |
| "../../logging:rtc_event_log_impl_base", |
| "../../modules/congestion_controller", |
| "../../modules/pacing", |
| "../../modules/remote_bitrate_estimator:remote_bitrate_estimator", |
| "../../modules/rtp_rtcp:rtp_rtcp_format", |
| ] |
| } |
| |
| rtc_static_library("audio_decoder_fuzzer") { |
| sources = [ |
| "audio_decoder_fuzzer.cc", |
| "audio_decoder_fuzzer.h", |
| ] |
| deps = [ |
| "../..:webrtc_common", |
| "../../:typedefs", |
| "../../api/audio_codecs:audio_codecs_api", |
| "../../modules/rtp_rtcp:rtp_rtcp_format", |
| "../../rtc_base:checks", |
| "../../rtc_base:rtc_base_approved", |
| "//third_party/abseil-cpp/absl/types:optional", |
| ] |
| } |
| |
| webrtc_fuzzer_test("audio_decoder_ilbc_fuzzer") { |
| sources = [ |
| "audio_decoder_ilbc_fuzzer.cc", |
| ] |
| deps = [ |
| ":audio_decoder_fuzzer", |
| "../../modules/audio_coding:ilbc", |
| ] |
| } |
| |
| webrtc_fuzzer_test("audio_decoder_isac_fuzzer") { |
| sources = [ |
| "audio_decoder_isac_fuzzer.cc", |
| ] |
| deps = [ |
| ":audio_decoder_fuzzer", |
| "../../modules/audio_coding:isac", |
| ] |
| } |
| |
| webrtc_fuzzer_test("audio_decoder_isac_incoming_packet_fuzzer") { |
| sources = [ |
| "audio_decoder_isac_incoming_packet_fuzzer.cc", |
| ] |
| deps = [ |
| ":audio_decoder_fuzzer", |
| "../../modules/audio_coding:isac", |
| ] |
| } |
| |
| webrtc_fuzzer_test("audio_decoder_isacfix_fuzzer") { |
| sources = [ |
| "audio_decoder_isacfix_fuzzer.cc", |
| ] |
| deps = [ |
| ":audio_decoder_fuzzer", |
| "../../modules/audio_coding:isac_fix", |
| ] |
| } |
| |
| webrtc_fuzzer_test("audio_decoder_opus_fuzzer") { |
| sources = [ |
| "audio_decoder_opus_fuzzer.cc", |
| ] |
| deps = [ |
| ":audio_decoder_fuzzer", |
| "../../modules/audio_coding:webrtc_opus", |
| ] |
| } |
| |
| webrtc_fuzzer_test("audio_decoder_opus_redundant_fuzzer") { |
| sources = [ |
| "audio_decoder_opus_redundant_fuzzer.cc", |
| ] |
| deps = [ |
| ":audio_decoder_fuzzer", |
| "../../modules/audio_coding:webrtc_opus", |
| ] |
| } |
| |
| webrtc_fuzzer_test("audio_encoder_opus_fuzzer") { |
| sources = [ |
| "audio_encoder_opus_fuzzer.cc", |
| ] |
| deps = [ |
| "../../api:array_view", |
| "../../api/audio_codecs/opus:audio_encoder_opus", |
| "../../rtc_base:checks", |
| "../../rtc_base:rtc_base_approved", |
| ] |
| } |
| |
| webrtc_fuzzer_test("turn_unwrap_fuzzer") { |
| sources = [ |
| "turn_unwrap_fuzzer.cc", |
| ] |
| deps = [ |
| "../../media:media", |
| "../../media:rtc_media_base", |
| ] |
| } |
| |
| webrtc_fuzzer_test("neteq_rtp_fuzzer") { |
| sources = [ |
| "neteq_rtp_fuzzer.cc", |
| ] |
| deps = [ |
| "../../api:array_view", |
| "../../modules/audio_coding:neteq", |
| "../../modules/audio_coding:neteq_test_tools", |
| "../../modules/audio_coding:neteq_tools_minimal", |
| "../../modules/audio_coding:pcm16b", |
| "../../modules/rtp_rtcp:rtp_rtcp_format", |
| "../../rtc_base:rtc_base_approved", |
| "../../rtc_base:rtc_base_tests_utils", |
| ] |
| } |
| |
| webrtc_fuzzer_test("neteq_signal_fuzzer") { |
| sources = [ |
| "neteq_signal_fuzzer.cc", |
| ] |
| deps = [ |
| "../../api:array_view", |
| "../../modules/audio_coding:neteq", |
| "../../modules/audio_coding:neteq_test_tools", |
| "../../modules/audio_coding:neteq_tools_minimal", |
| "../../modules/audio_coding:pcm16b", |
| "../../rtc_base:rtc_base_approved", |
| "../../rtc_base:rtc_base_tests_utils", |
| ] |
| } |
| |
| webrtc_fuzzer_test("residual_echo_detector_fuzzer") { |
| sources = [ |
| "residual_echo_detector_fuzzer.cc", |
| ] |
| deps = [ |
| "../../modules/audio_processing:audio_processing", |
| "../../rtc_base:checks", |
| "../../rtc_base:rtc_base_approved", |
| ] |
| } |
| |
| webrtc_fuzzer_test("sdp_parser_fuzzer") { |
| sources = [ |
| "sdp_parser_fuzzer.cc", |
| ] |
| deps = [ |
| "../../api:libjingle_peerconnection_api", |
| "../../pc:libjingle_peerconnection", |
| ] |
| seed_corpus = "corpora/sdp-corpus" |
| libfuzzer_options = [ "max_len=16384" ] |
| } |
| |
| webrtc_fuzzer_test("stun_parser_fuzzer") { |
| sources = [ |
| "stun_parser_fuzzer.cc", |
| ] |
| deps = [ |
| "../../p2p:rtc_p2p", |
| ] |
| seed_corpus = "corpora/stun-corpus" |
| dict = "corpora/stun.tokens" |
| } |
| |
| webrtc_fuzzer_test("stun_validator_fuzzer") { |
| sources = [ |
| "stun_validator_fuzzer.cc", |
| ] |
| deps = [ |
| "../../p2p:rtc_p2p", |
| ] |
| seed_corpus = "corpora/stun-corpus" |
| dict = "corpora/stun.tokens" |
| } |
| |
| webrtc_fuzzer_test("pseudotcp_parser_fuzzer") { |
| sources = [ |
| "pseudotcp_parser_fuzzer.cc", |
| ] |
| deps = [ |
| "../../p2p:rtc_p2p", |
| "../../rtc_base:rtc_base", |
| ] |
| } |
| |
| webrtc_fuzzer_test("transport_feedback_packet_loss_tracker_fuzzer") { |
| sources = [ |
| "transport_feedback_packet_loss_tracker_fuzzer.cc", |
| ] |
| deps = [ |
| "../../api:array_view", |
| "../../audio", |
| "../../modules/rtp_rtcp:rtp_rtcp_format", |
| "../../rtc_base:rtc_base_approved", |
| ] |
| } |
| rtc_static_library("audio_processing_fuzzer_helper") { |
| sources = [ |
| "audio_processing_fuzzer_helper.cc", |
| "audio_processing_fuzzer_helper.h", |
| ] |
| deps = [ |
| ":fuzz_data_helper", |
| "../../api/audio:audio_frame_api", |
| "../../modules/audio_processing", |
| "../../rtc_base:checks", |
| "../../rtc_base:rtc_base_approved", |
| "//third_party/abseil-cpp/absl/types:optional", |
| ] |
| } |
| |
| webrtc_fuzzer_test("audio_processing_fuzzer") { |
| sources = [ |
| "audio_processing_configs_fuzzer.cc", |
| ] |
| deps = [ |
| ":audio_processing_fuzzer_helper", |
| "../../api/audio:aec3_factory", |
| "../../modules/audio_processing", |
| "../../modules/audio_processing/aec3", |
| "../../modules/audio_processing/aec_dump:mock_aec_dump", |
| "../../rtc_base:ptr_util", |
| "../../rtc_base:rtc_base_approved", |
| "../../rtc_base:safe_minmax", |
| "../../system_wrappers:field_trial_default", |
| ] |
| seed_corpus = "corpora/audio_processing-corpus" |
| } |
| |
| webrtc_fuzzer_test("agc_fuzzer") { |
| sources = [ |
| "agc_fuzzer.cc", |
| ] |
| deps = [ |
| ":fuzz_data_helper", |
| "../../modules/audio_processing", |
| "../../rtc_base:rtc_base_approved", |
| "../../rtc_base:safe_minmax", |
| ] |
| |
| seed_corpus = "corpora/agc-corpus" |
| libfuzzer_options = [ "max_len=200000" ] |
| } |
| |
| webrtc_fuzzer_test("comfort_noise_decoder_fuzzer") { |
| sources = [ |
| "comfort_noise_decoder_fuzzer.cc", |
| ] |
| deps = [ |
| "../../api:array_view", |
| "../../modules/audio_coding:cng", |
| "../../rtc_base:rtc_base_approved", |
| ] |
| } |
| |
| webrtc_fuzzer_test("rtp_frame_reference_finder_fuzzer") { |
| sources = [ |
| "rtp_frame_reference_finder_fuzzer.cc", |
| ] |
| deps = [ |
| "../../modules/video_coding/", |
| "../../rtc_base:ptr_util", |
| "../../system_wrappers", |
| ] |
| libfuzzer_options = [ "max_len=20000" ] |
| } |
| |
| webrtc_fuzzer_test("frame_buffer2_fuzzer") { |
| sources = [ |
| "frame_buffer2_fuzzer.cc", |
| ] |
| deps = [ |
| "../../modules/video_coding/", |
| "../../system_wrappers:system_wrappers", |
| ] |
| libfuzzer_options = [ "max_len=10000" ] |
| } |