aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Adrian Taylor <ade@hohum.me.uk>2022-06-30 18:38:42 -0700
committerGravatar GitHub <noreply@github.com>2022-07-01 01:38:42 +0000
commit36a6c45c525570687e5f4074abbdaac42d3ebe0d (patch)
tree6752d7d3362ff573cc902f862782d195b6fe1a67
parent454a645eed883ccaf4d4cdbddd32db95abd54627 (diff)
Submit itoa and ryu. (#7928)
* Submit itoa and ryu. These two libraries are used by serde_json which, in turn, is used as the standard JSON parser in various higher level projects. Both itoa and ryu contain unsafe code, which this fuzzes. * Update project.yaml * Update project.yaml * Update Dockerfile * Update Dockerfile * Rejigging ryu/itoa Dockerfiles. Previously I was following the example of image-png, but that appears not to be the modern standard. Now following the example of zip-rs instead. * Fix Dockerfile error * Further Dockerfile fix. Co-authored-by: jonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com>
-rw-r--r--projects/itoa/Dockerfile22
-rwxr-xr-xprojects/itoa/build.sh21
-rw-r--r--projects/itoa/project.yaml10
-rw-r--r--projects/ryu/Dockerfile22
-rwxr-xr-xprojects/ryu/build.sh21
-rw-r--r--projects/ryu/project.yaml10
6 files changed, 106 insertions, 0 deletions
diff --git a/projects/itoa/Dockerfile b/projects/itoa/Dockerfile
new file mode 100644
index 00000000..dee3ddd4
--- /dev/null
+++ b/projects/itoa/Dockerfile
@@ -0,0 +1,22 @@
+# 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
+
+RUN git clone --depth 1 https://github.com/dtolnay/itoa
+WORKDIR $SRC
+
+COPY build.sh $SRC/
diff --git a/projects/itoa/build.sh b/projects/itoa/build.sh
new file mode 100755
index 00000000..9fcf864c
--- /dev/null
+++ b/projects/itoa/build.sh
@@ -0,0 +1,21 @@
+#!/bin/bash -eu
+# 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
+cd itoa
+cargo fuzz build -O
+cp fuzz/target/x86_64-unknown-linux-gnu/release/fuzz_itoa $OUT/
diff --git a/projects/itoa/project.yaml b/projects/itoa/project.yaml
new file mode 100644
index 00000000..8a18b769
--- /dev/null
+++ b/projects/itoa/project.yaml
@@ -0,0 +1,10 @@
+homepage: "https://github.com/dtolnay/itoa"
+primary_contact: "dtolnay@gmail.com"
+main_repo: "https://github.com/dtolnay/itoa"
+sanitizers:
+ - address
+fuzzing_engines:
+ - libfuzzer
+language: rust
+auto_ccs:
+ - "adetaylor@chromium.org"
diff --git a/projects/ryu/Dockerfile b/projects/ryu/Dockerfile
new file mode 100644
index 00000000..64516ee8
--- /dev/null
+++ b/projects/ryu/Dockerfile
@@ -0,0 +1,22 @@
+# 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
+
+RUN git clone --depth 1 https://github.com/dtolnay/ryu
+WORKDIR $SRC
+
+COPY build.sh $SRC/
diff --git a/projects/ryu/build.sh b/projects/ryu/build.sh
new file mode 100755
index 00000000..249719b4
--- /dev/null
+++ b/projects/ryu/build.sh
@@ -0,0 +1,21 @@
+#!/bin/bash -eu
+# 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
+cd ryu
+cargo fuzz build -O
+cp fuzz/target/x86_64-unknown-linux-gnu/release/fuzz_ryu $OUT/
diff --git a/projects/ryu/project.yaml b/projects/ryu/project.yaml
new file mode 100644
index 00000000..f4a1833e
--- /dev/null
+++ b/projects/ryu/project.yaml
@@ -0,0 +1,10 @@
+homepage: "https://github.com/dtolnay/ryu"
+main_repo: "https://github.com/dtolnay/ryu"
+primary_contact: "dtolnay@gmail.com"
+sanitizers:
+ - address
+fuzzing_engines:
+ - libfuzzer
+language: rust
+auto_ccs:
+ - "adetaylor@chromium.org"