From 9a509256de57e848a22c28131a5a6f6f71894374 Mon Sep 17 00:00:00 2001 From: Arthur Chan Date: Mon, 4 Nov 2024 20:16:57 +0000 Subject: [PATCH] tar-rs: Initial integation (#12645) This PR initialises OSS-Fuzz integration for the tar-rs project in Rust. New fuzzers have been created, and a PR (https://github.com/alexcrichton/tar-rs/pull/385) has been submitted upstream to merge the fuzzers. --------- Signed-off-by: Arthur Chan --- projects/tar-rs/Dockerfile | 21 +++++++++++++++++++++ projects/tar-rs/build.sh | 23 +++++++++++++++++++++++ projects/tar-rs/project.yaml | 11 +++++++++++ 3 files changed, 55 insertions(+) create mode 100644 projects/tar-rs/Dockerfile create mode 100755 projects/tar-rs/build.sh create mode 100644 projects/tar-rs/project.yaml diff --git a/projects/tar-rs/Dockerfile b/projects/tar-rs/Dockerfile new file mode 100644 index 000000000000..fff72ac178e1 --- /dev/null +++ b/projects/tar-rs/Dockerfile @@ -0,0 +1,21 @@ +# Copyright 2024 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 https://github.com/alexcrichton/tar-rs +WORKDIR $SRC/tar-rs + +COPY build.sh $SRC/ diff --git a/projects/tar-rs/build.sh b/projects/tar-rs/build.sh new file mode 100755 index 000000000000..a08957f53867 --- /dev/null +++ b/projects/tar-rs/build.sh @@ -0,0 +1,23 @@ +#!/bin/bash -eu +# Copyright 2024 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. +# +################################################################################ + +# Build the fuzzers and project source code +cargo fuzz build + +# Copy built fuzzer binaries to $OUT +find $SRC/tar-rs/fuzz/target/x86_64-unknown-linux-gnu/release -maxdepth 1 \ + -type f -perm -u=x -exec cp {} $OUT \; diff --git a/projects/tar-rs/project.yaml b/projects/tar-rs/project.yaml new file mode 100644 index 000000000000..abbbbd1ec3e0 --- /dev/null +++ b/projects/tar-rs/project.yaml @@ -0,0 +1,11 @@ +homepage: "https://github.com/alexcrichton/tar-rs" +main_repo: "https://github.com/alexcrichton/tar-rs.git" +primary_contact: "cgwalters@gmail.com" +sanitizers: + - address +fuzzing_engines: + - libfuzzer +language: rust +auto_ccs: + - "arthur.chan@adalogics.com" + - "david@adalogics.com"