File tree 3 files changed +73
-0
lines changed
3 files changed +73
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Copyright 2018 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ #
15
+ # ###############################################################################
16
+
17
+ FROM gcr.io/oss-fuzz-base/base-builder
18
+
19
+ RUN apt-get update && apt-get install -y make cmake flex bison
20
+ RUN git clone --depth=1 https://github.com/the-tcpdump-group/libpcap.git libpcap
21
+ # TODO use main repo
22
+ RUN git clone --depth=1 --branch fuzz https://github.com/catenacyber/tcpdump.git tcpdump
23
+ WORKDIR $SRC
24
+ COPY build.sh $SRC/
Original file line number Diff line number Diff line change
1
+ #! /bin/bash -eu
2
+ # Copyright 2018 Google Inc.
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
+
18
+ cd libpcap
19
+ mkdir build
20
+ cd build
21
+ cmake ..
22
+ make
23
+ make install
24
+
25
+ cd ../../tcpdump
26
+ # build project
27
+ mkdir build
28
+ cd build
29
+ cmake ..
30
+ make
31
+
32
+ # build fuzz targets
33
+ $CC $CFLAGS -I.. -I. -c ../fuzz/fuzz_pcap.c -o fuzz_pcap.o
34
+ $CXX $CXXFLAGS fuzz_pcap.o -o $OUT /fuzz_pcap libnetdissect.a ../../libpcap/build/libpcap.a -lFuzzingEngine
35
+
36
+ # export other associated stuff
37
+ cd ..
38
+ cp fuzz/fuzz_* .options $OUT /
39
+ # builds corpus
40
+ zip -r fuzz_pcap_seed_corpus.zip tests/* .pcap
41
+ cp fuzz_pcap_seed_corpus.zip $OUT /
Original file line number Diff line number Diff line change
1
+ homepage : " https://www.tcpdump.org"
2
+ primary_contact :
" [email protected] "
3
+
4
+
5
+ sanitizers :
6
+ - address
7
+ - memory
8
+ - undefined
You can’t perform that action at this time.
0 commit comments