-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.fuzz
More file actions
58 lines (43 loc) · 2.29 KB
/
Dockerfile.fuzz
File metadata and controls
58 lines (43 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
FROM ubuntu:22.04
ARG UID=1000
RUN useradd --shell /bin/bash -u $UID -o -c "" -m myuser \
&& mkdir work
RUN apt-get update \
&& apt-get install -y --no-install-suggests --no-install-recommends wget curl
COPY --from=ghcr.io/astral-sh/uv:0.7.11 /uv /uvx /bin/
RUN wget --no-check-certificate https://software.intel.com/sites/landingpage/pintool/downloads/pin-external-3.31-98861-g71afcc22f-gcc-linux.tar.gz \
&& tar zxvf pin-external-3.31-98861-g71afcc22f-gcc-linux.tar.gz \
&& rm pin-external-3.31-98861-g71afcc22f-gcc-linux.tar.gz
ENV PATH=$PATH:/pin-external-3.31-98861-g71afcc22f-gcc-linux
ENV PINTOOLS_DIR=/pin-external-3.31-98861-g71afcc22f-gcc-linux/source/tools/MyPinTool/
RUN apt-get update && apt-get install -y --no-install-suggests --no-install-recommends \
python3 python3-pip pypy3 pypy3-dev graphviz git make gcc build-essential python3-dev automake cmake flex bison libglib2.0-dev libpixman-1-dev python3-setuptools libgtk-3-dev unzip vim hyperfine gdb
COPY requirements.txt /requirements.txt
RUN UV_PYTHON=python3 uv pip install --system -r requirements.txt
RUN UV_PYTHON=pypy3 uv pip install --system -r requirements.txt
WORKDIR /work
RUN cd /work \
&& mkdir tmp_project \
&& mkdir /tmp/edges \
&& mkdir /tmp/output \
&& chown myuser. /work -R \
&& chown myuser. /tmp/edges -R \
&& chown myuser. /tmp/output -R \
&& chown myuser. /pin-external-3.31-98861-g71afcc22f-gcc-linux -R
RUN git clone https://github.com/AFLplusplus/AFLplusplus -b v4.21c --depth 1 && \
git clone /work/AFLplusplus /work/AFLplusplus_unpatched
COPY aflpp_patch /work/aflpp_patch
RUN cd AFLplusplus \
&& git apply /work/aflpp_patch/coverage.patch \
&& gmake afl-fuzz \
&& cd ../AFLplusplus_unpatched \
&& gmake afl-fuzz
RUN apt-get update && apt-get install -y --no-install-suggests --no-install-recommends \
libpopt-dev protobuf-compiler libprotobuf-dev libprotobuf-c-dev libprotobuf-c1 \
libprotobuf-lite23 libprotobuf23
RUN apt-get install -y --no-install-suggests --no-install-recommends \
texinfo libpng-dev libjpeg-dev libtiff-dev libwebp-dev
RUN apt-get install -y libmaxminddb0 libmaxminddb-dev
RUN apt-get install -y libfontconfig1-dev libfreetype-dev libxml2-dev libssl-dev libjpeg-dev libpng-dev libtiff-dev libidn11-dev
USER myuser
CMD ./docker_script.sh