mirror of
https://github.com/cloudflare/quiche.git
synced 2025-04-20 02:32:10 +08:00
fuzz: build fuzzers inside docker
This commit is contained in:
parent
407d91b290
commit
998f8996a3
@ -7,8 +7,7 @@ COPY octets/ ./octets/
|
|||||||
COPY qlog/ ./qlog/
|
COPY qlog/ ./qlog/
|
||||||
COPY quiche/ ./quiche/
|
COPY quiche/ ./quiche/
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y cmake && \
|
RUN apt-get update && apt-get install -y cmake && rm -rf /var/lib/apt/lists/*
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
RUN cargo build --manifest-path apps/Cargo.toml
|
RUN cargo build --manifest-path apps/Cargo.toml
|
||||||
|
|
||||||
|
4
Makefile
4
Makefile
@ -40,8 +40,8 @@ build-fuzz:
|
|||||||
|
|
||||||
# build fuzzing image
|
# build fuzzing image
|
||||||
.PHONY: docker-fuzz
|
.PHONY: docker-fuzz
|
||||||
docker-fuzz: build-fuzz
|
docker-fuzz:
|
||||||
$(DOCKER) build --tag $(FUZZ_REPO):$(FUZZ_TAG) fuzz
|
$(DOCKER) build -f fuzz/Dockerfile --target quiche-libfuzzer --tag $(FUZZ_REPO):$(FUZZ_TAG) .
|
||||||
|
|
||||||
.PHONY: docker-fuzz-publish
|
.PHONY: docker-fuzz-publish
|
||||||
docker-fuzz-publish:
|
docker-fuzz-publish:
|
||||||
|
@ -1,14 +1,36 @@
|
|||||||
FROM debian:bullseye
|
FROM rustlang/rust:nightly as fuzz
|
||||||
|
|
||||||
|
WORKDIR /build
|
||||||
|
|
||||||
|
COPY Cargo.toml Cargo.toml
|
||||||
|
COPY Makefile Makefile
|
||||||
|
COPY apps/ ./apps/
|
||||||
|
COPY fuzz/ ./fuzz/
|
||||||
|
COPY octets/ ./octets/
|
||||||
|
COPY qlog/ ./qlog/
|
||||||
|
COPY quiche/ ./quiche/
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y cmake && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN cargo install cargo-fuzz
|
||||||
|
RUN make build-fuzz
|
||||||
|
|
||||||
|
##
|
||||||
|
## quiche-libfuzzer: quiche image for fuzzing
|
||||||
|
##
|
||||||
|
FROM debian:latest as quiche-libfuzzer
|
||||||
|
|
||||||
LABEL maintainer="alessandro@cloudflare.com"
|
LABEL maintainer="alessandro@cloudflare.com"
|
||||||
|
|
||||||
WORKDIR /home/mayhem/
|
WORKDIR /home/mayhem/
|
||||||
|
|
||||||
# Install llvm-symbolizer to have source code information in stack traces
|
RUN apt-get update && apt-get install -y ca-certificates llvm && rm -rf /var/lib/apt/lists/*
|
||||||
RUN apt-get update && apt-get install llvm -y
|
|
||||||
|
|
||||||
COPY ./cert.crt ./
|
COPY fuzz/cert.crt ./
|
||||||
COPY ./cert.key ./
|
COPY fuzz/cert.key ./
|
||||||
|
|
||||||
COPY ./target/x86_64-unknown-linux-gnu/release/packet_recv_client ./
|
COPY --from=fuzz \
|
||||||
COPY ./target/x86_64-unknown-linux-gnu/release/packet_recv_server ./
|
/build/fuzz/target/x86_64-unknown-linux-gnu/release/packet_recv_client \
|
||||||
COPY ./target/x86_64-unknown-linux-gnu/release/qpack_decode ./
|
/build/fuzz/target/x86_64-unknown-linux-gnu/release/packet_recv_server \
|
||||||
|
/build/fuzz/target/x86_64-unknown-linux-gnu/release/qpack_decode \
|
||||||
|
./
|
||||||
|
Loading…
x
Reference in New Issue
Block a user