Skip to content

Commit

Permalink
Added minimized corpus
Browse files Browse the repository at this point in the history
  • Loading branch information
ennamarie19 authored and ForAllSecure Mayhem Bot committed Jan 30, 2024
1 parent f64a33f commit 01755a4
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 0 deletions.
29 changes: 29 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#Build Stage
FROM fuzzers/cargo-fuzz:0.10.0 as builder

##Install Build Dependencies
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y git clang

##ADD source code to the build stage
WORKDIR /
ADD https://api.github.com/repos/ennamarie19/miniz_oxide/git/refs/heads/mayhem version.json
RUN git clone -b mayhem https://github.com/ennamarie19/miniz_oxide.git
WORKDIR /miniz_oxide

##Build
ENV RUSTFLAGS="-Clink-arg=-fuse-ld=gold"
RUN rustup default nightly
RUN cargo install cargo-fuzz -Z no-index-update
RUN cargo fuzz build inflate_nonwrapping -Zno-index-update

##Prepare all library dependencies for copy
RUN mkdir /deps
RUN cp `ldd /miniz_oxide/fuzz/target/x86_64-unknown-linux-gnu/release/inflate_nonwrapping | grep so | sed -e '/^[^\t]/ d' | sed -e 's/\t//' | sed -e 's/.*=..//' | sed -e 's/ (0.*)//' \
| sort | uniq` /deps 2>/dev/null || :

FROM --platform=linux/amd64 ubuntu:20.04
COPY --from=builder /miniz_oxide/fuzz/target/x86_64-unknown-linux-gnu/release/inflate_nonwrapping /inflate_nonwrapping
COPY --from=builder /deps /usr/lib

CMD ["/inflate_nonwrapping"]
9 changes: 9 additions & 0 deletions Mayhemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
image: ghcr.io/ennamarie19/openslide-fuzz:latest
project: openslide
target: openslide-fuzz
testsuite:
- file://test/corpus/inflate_nonwrapping

cmds:
- cmd: /fuzz
libfuzzer: true
Binary file not shown.
2 changes: 2 additions & 0 deletions fuzz/seeds/minimal/258abee9246b7d015c0dceb64daf9e62de9656f6
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

J;oad_k```````````````0``:````$`` �
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
�0_lo0aB� � 
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
��*�;���ȇ��*�;����L
Binary file not shown.
Binary file not shown.

0 comments on commit 01755a4

Please sign in to comment.