diff --git a/projects/lotus/Dockerfile b/projects/lotus/Dockerfile new file mode 100644 index 000000000..1a4b2df6a --- /dev/null +++ b/projects/lotus/Dockerfile @@ -0,0 +1,23 @@ +# Copyright 2021 Google LLC. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ + +FROM gcr.io/oss-fuzz-base/base-builder +RUN apt-get update && apt-get install -y mesa-opencl-icd ocl-icd-opencl-dev gcc \ + git bzr jq pkg-config curl clang build-essential hwloc libhwloc-dev +RUN git clone --depth 1 https://github.com/filecoin-project/lotus $GOPATH/src/github.com/filecoin-project/lotus +RUN git clone --depth 1 https://github.com/filecoin-project/fuzzing-lotus $GOPATH/src/github.com/filecoin-project/fuzzing-lotus +COPY build.sh $SRC/ +WORKDIR $GOPATH/src/github.com/filecoin-project/lotus diff --git a/projects/lotus/build.sh b/projects/lotus/build.sh new file mode 100644 index 000000000..0f20ed768 --- /dev/null +++ b/projects/lotus/build.sh @@ -0,0 +1,24 @@ +#/bin/bash -eu +# Copyright 2021 Google LLC. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ + +make + +compile_go_fuzzer github.com/filecoin-project/lotus/chain/types FuzzMessage fuzz_message gofuzz +compile_go_fuzzer github.com/filecoin-project/fuzzing-lotus/fuzz FuzzBlockMsg fuzz_block_msg +compile_go_fuzzer github.com/filecoin-project/fuzzing-lotus/fuzz FuzzBlockMsgStructural fuzz_block_msg_structural +compile_go_fuzzer github.com/filecoin-project/fuzzing-lotus/fuzz FuzzBlockHeader fuzz_block_header +compile_go_fuzzer github.com/filecoin-project/fuzzing-lotus/fuzz FuzzNodesForHeight fuzz_nodes_for_height diff --git a/projects/lotus/project.yaml b/projects/lotus/project.yaml new file mode 100644 index 000000000..6ab81c113 --- /dev/null +++ b/projects/lotus/project.yaml @@ -0,0 +1,11 @@ +homepage: "https://github.com/filecoin-project/lotus" +main_repo: "https://github.com/filecoin-project/lotus" +primary_contact: "security@filecoin.org" +auto_ccs : + - "Adam@adalogics.com" + - "kubuxu@protocol.ai" +language: go +fuzzing_engines: + - libfuzzer +sanitizers: + - address