SockFuzzer icon indicating copy to clipboard operation
SockFuzzer copied to clipboard

doesn't building via Docker

Open HoPi0539 opened this issue 4 years ago • 3 comments

After the latest update, the build does not work.

$docker build --pull -t builder .
[+] Building 0.8s (14/14) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                                        0.0s
 => => transferring dockerfile: 828B                                                                                                                                                                                                                                        0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                                           0.0s
 => => transferring context: 34B                                                                                                                                                                                                                                            0.0s
 => [internal] load metadata for gcr.io/oss-fuzz-base/base-builder:latest                                                                                                                                                                                                   0.7s
 => [ 1/10] FROM gcr.io/oss-fuzz-base/base-builder@sha256:2c71487c3d96e6eacc270c423f1561ab5e77379769dd5fd1b620fa3a7294e923                                                                                                                                                  0.0s
 => [internal] load build context                                                                                                                                                                                                                                           0.0s
 => => transferring context: 2B                                                                                                                                                                                                                                             0.0s
 => CACHED [ 2/10] RUN apt-get update && apt-get install -y     autoconf     cmake     git     g++-multilib     libtool     ninja-build     python                                                                                                                          0.0s
 => CACHED [ 3/10] RUN curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.18.1/protobuf-cpp-3.18.1.tar.gz                                                                                                                                            0.0s
 => CACHED [ 4/10] RUN tar xf protobuf-cpp-3.18.1.tar.gz                                                                                                                                                                                                                    0.0s
 => CACHED [ 5/10] WORKDIR /src/protobuf-3.18.1                                                                                                                                                                                                                             0.0s
 => CACHED [ 6/10] RUN ./configure --disable-shared                                                                                                                                                                                                                         0.0s
 => CACHED [ 7/10] RUN make -j $(nproc)                                                                                                                                                                                                                                     0.0s
 => CACHED [ 8/10] RUN make install                                                                                                                                                                                                                                         0.0s
 => CACHED [ 9/10] WORKDIR /src                                                                                                                                                                                                                                             0.0s
 => ERROR [10/10] COPY build.sh /src                                                                                                                                                                                                                                        0.0s
------
 > [10/10] COPY build.sh /src:
------
failed to compute cache key: "/build.sh" not found: not found

where is "build.sh" ?

HoPi0539 avatar Oct 26 '21 06:10 HoPi0539

It's in the source but not at the base.

Can we fix this in either case?

mbhatt1 avatar Dec 24 '21 23:12 mbhatt1

Hey I'll take a look at this. I'm doing a big refactor of the build code to make it a lot easier to work with but until that's ready to be shared I can fix this up. I'm also happy to take pull requests if anyone has already fixed this. Happy holidays!

nedwill avatar Dec 25 '21 00:12 nedwill

Thanks :)

This is quite an interesting way to fuzz xnu kernel. I'm interested to see if we can use protobuf grammar to fuzz other areas of xnu as well. I'll mess with it after the holidays. :D

mbhatt1 avatar Dec 25 '21 02:12 mbhatt1