• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash -eu
2# Copyright 2021 Google LLC
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#      http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16################################################################################
17
18TARGET_PATH="./fuzz/target/x86_64-unknown-linux-gnu/release"
19BASE="$SRC/linkerd2-proxy/linkerd"
20BUILD_FUZZER="cargo +nightly fuzz build "
21
22cd ${BASE}/app/inbound
23${BUILD_FUZZER}
24cp ${TARGET_PATH}/fuzz_target_1 $OUT/fuzz_inbound
25
26cd ${BASE}/addr/
27${BUILD_FUZZER}
28cp ${TARGET_PATH}/fuzz_target_1 $OUT/fuzz_addr
29
30cd ${BASE}/dns
31${BUILD_FUZZER}
32cp ${TARGET_PATH}/fuzz_target_1 $OUT/fuzz_dns
33
34cd ${BASE}/proxy/http
35${BUILD_FUZZER}
36cp ${TARGET_PATH}/fuzz_target_1 $OUT/fuzz_http
37
38cd ${BASE}/tls
39${BUILD_FUZZER}
40cp ${TARGET_PATH}/fuzz_target_1 $OUT/fuzz_tls
41
42cd ${BASE}/transport-header
43${BUILD_FUZZER}
44cp ${TARGET_PATH}/fuzz_target_raw $OUT/fuzz_transport_raw
45cp ${TARGET_PATH}/fuzz_target_structured $OUT/fuzz_transport_structured
46
47echo "[libfuzzer]" > $OUT/fuzz_transport_raw.options
48echo "detect_leaks=0" >> $OUT/fuzz_transport_raw.options
49