mirror of https://github.com/google/oss-fuzz.git
New project: crosvm (#10284)
crosvm fuzzing is currently running as part of ChromeOS infra, where the project originated. Crosvm has since become an independent project with separate infrastructure and we would like to move fuzzing out of ChromeOS as well. Tested with `python3 infra/helper.py check_build crosvm` --------- Co-authored-by: jonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com>
This commit is contained in:
parent
8a26e56cd7
commit
91aaa43e4e
|
@ -0,0 +1,26 @@
|
||||||
|
# Copyright 2023 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-rust
|
||||||
|
|
||||||
|
RUN git clone --depth=1 --recursive https://chromium.googlesource.com/crosvm/crosvm $SRC/crosvm
|
||||||
|
|
||||||
|
RUN apt-get upgrade && apt-get install --yes --no-install-recommends \
|
||||||
|
libclang-dev \
|
||||||
|
pkg-config \
|
||||||
|
libcap-dev
|
||||||
|
|
||||||
|
COPY build.sh $SRC
|
|
@ -0,0 +1,33 @@
|
||||||
|
#!/bin/bash -eu
|
||||||
|
# Copyright 2023 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.
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
cd crosvm
|
||||||
|
|
||||||
|
# Build crosvm fuzzers
|
||||||
|
# Unset the SRC variable as it will interfere with minijail's common.mk framework.
|
||||||
|
env -u SRC cargo +nightly \
|
||||||
|
fuzz build \
|
||||||
|
-O \
|
||||||
|
--fuzz-dir=crosvm-fuzz \
|
||||||
|
--features upstream-fuzz
|
||||||
|
|
||||||
|
# Copy fuzzer binaries to $OUT
|
||||||
|
FUZZ_TARGET_OUTPUT_DIR="target/x86_64-unknown-linux-gnu/release"
|
||||||
|
for f in crosvm-fuzz/*.rs; do
|
||||||
|
FUZZ_TARGET_NAME=$(basename ${f%.*})
|
||||||
|
cp "${FUZZ_TARGET_OUTPUT_DIR}/crosvm_${FUZZ_TARGET_NAME}" "$OUT/"
|
||||||
|
done
|
|
@ -0,0 +1,10 @@
|
||||||
|
homepage: "http://crosvm.dev"
|
||||||
|
language: rust
|
||||||
|
primary_contact: "denniskempin@google.com"
|
||||||
|
auto_ccs:
|
||||||
|
- "crosvm-core@google.com"
|
||||||
|
main_repo: "https://chromium.googlesource.com/crosvm/crosvm"
|
||||||
|
sanitizers:
|
||||||
|
- address
|
||||||
|
fuzzing_engines:
|
||||||
|
- libfuzzer
|
Loading…
Reference in New Issue