mirror of https://github.com/google/oss-fuzz.git
intial integration redis-rs (#8725)
Redis-rs has 5 million downloads 12k downloads per day. Redis-rs is the most popular redis library for rust. It is also used as dependecy for many rust libraries. Co-authored-by: Navidem <navid.emamdoost@gmail.com>
This commit is contained in:
parent
c6fa37a712
commit
8ac243eeea
|
@ -0,0 +1,19 @@
|
|||
# Copyright 2022 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 as builder
|
||||
|
||||
RUN git clone --depth 1 https://github.com/redis-rs/redis-rs.git
|
||||
COPY build.sh $SRC/
|
||||
COPY /fuzz $SRC/redis-rs/fuzz
|
|
@ -0,0 +1,17 @@
|
|||
# Copyright 2022 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 $SRC/redis-rs/fuzz
|
||||
cargo fuzz build
|
||||
cp $SRC/redis-rs/fuzz/target/x86_64-unknown-linux-gnu/release/parser $OUT/
|
|
@ -0,0 +1,39 @@
|
|||
# Copyright 2022 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.
|
||||
################################################################################
|
||||
[package]
|
||||
name = "redis-fuzz"
|
||||
version = "0.0.0"
|
||||
authors = ["Automatically generated"]
|
||||
publish = false
|
||||
edition = "2018"
|
||||
|
||||
[package.metadata]
|
||||
cargo-fuzz = true
|
||||
|
||||
[dependencies]
|
||||
libfuzzer-sys = "0.4"
|
||||
|
||||
[dependencies.redis]
|
||||
path = "../redis"
|
||||
|
||||
# Prevent this from interfering with workspaces
|
||||
[workspace]
|
||||
members = ["."]
|
||||
|
||||
[[bin]]
|
||||
name = "parser"
|
||||
path = "fuzz_targets/parser.rs"
|
||||
test = false
|
||||
doc = false
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
# Copyright 2022 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.
|
||||
################################################################################
|
||||
*/
|
||||
#![no_main]
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
|
||||
use redis::parse_redis_value;
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
let _ = parse_redis_value(data);
|
||||
});
|
|
@ -0,0 +1,15 @@
|
|||
homepage: "https://github.com/redis-rs/redis-rs"
|
||||
language: rust
|
||||
primary_contact: "armin.ronacher@active-4.com"
|
||||
auto_ccs:
|
||||
- "armin.ronacher@active-4.com"
|
||||
- "g@leirbag.net"
|
||||
- "dirkjan@ochtman.nl"
|
||||
- "mail@bargen.dev"
|
||||
- "bonet@hey.com"
|
||||
- "XWraithanX@gmail.com"
|
||||
sanitizers:
|
||||
- address
|
||||
fuzzing_engines:
|
||||
- libfuzzer
|
||||
main_repo: 'https://github.com/redis-rs/redis-rs'
|
Loading…
Reference in New Issue