fuzzers: add DTLS fuzzer
to fuzz the code parsing DTLS packets for DTLS-STUN piggybacking BUG=webrtc:367395350 Change-Id: Ifa1a52ef56b322e465604e8d49ae18e5dc27613f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/371360 Reviewed-by: Jonas Oreland <jonaso@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Commit-Queue: Philipp Hancke <phancke@meta.com> Cr-Commit-Position: refs/heads/main@{#43562}
This commit is contained in:
parent
316d93b415
commit
adacadb678
@ -102,6 +102,17 @@ webrtc_fuzzer_test("vp9_depacketizer_fuzzer") {
|
||||
]
|
||||
}
|
||||
|
||||
webrtc_fuzzer_test("dtls_utils_fuzzer") {
|
||||
sources = [ "dtls_utils_fuzzer.cc" ]
|
||||
deps = [
|
||||
"../../api:array_view",
|
||||
"../../p2p:dtls_utils",
|
||||
]
|
||||
|
||||
# Seed from boringssl DTLS corpus.
|
||||
seed_corpus = "../../third_party/boringssl/src/fuzz/dtls_client_corpus"
|
||||
}
|
||||
|
||||
webrtc_fuzzer_test("vp8_qp_parser_fuzzer") {
|
||||
sources = [ "vp8_qp_parser_fuzzer.cc" ]
|
||||
deps = [
|
||||
|
||||
@ -2,4 +2,5 @@ include_rules = [
|
||||
"+audio",
|
||||
"+pc",
|
||||
"+net/dcsctp",
|
||||
"+p2p",
|
||||
]
|
||||
|
||||
21
test/fuzzers/dtls_utils_fuzzer.cc
Normal file
21
test/fuzzers/dtls_utils_fuzzer.cc
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright (c) 2024 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.
|
||||
*/
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
#include "api/array_view.h"
|
||||
#include "p2p/dtls/dtls_utils.h"
|
||||
|
||||
namespace webrtc {
|
||||
void FuzzOneInput(const uint8_t* data, size_t size) {
|
||||
cricket::GetDtlsHandshakeAcks(rtc::MakeArrayView(data, size));
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
Loading…
x
Reference in New Issue
Block a user